Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PhpunitDeprecationTriggered.php

class PhpunitDeprecationTriggered

@psalm-immutable

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\Event\Test\PhpunitDeprecationTriggered implements \PHPUnit\Event\Event

Expanded class hierarchy of PhpunitDeprecationTriggered

7 files declare their use of PhpunitDeprecationTriggered
Collector.php in vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php
ResultPrinter.php in vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php
TestResult.php in vendor/phpunit/phpunit/src/Runner/TestResult/TestResult.php
TestResultCollector.php in vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php
TestTriggeredPhpunitDeprecationSubscriber.php in vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php

... See full list

File

vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php, line 23

Namespace

PHPUnit\Event\Test
View source
final class PhpunitDeprecationTriggered implements Event {
    private readonly Telemetry\Info $telemetryInfo;
    private readonly Test $test;
    
    /**
     * @psalm-var non-empty-string
     */
    private readonly string $message;
    
    /**
     * @psalm-param non-empty-string $message
     */
    public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message) {
        $this->telemetryInfo = $telemetryInfo;
        $this->test = $test;
        $this->message = $message;
    }
    public function telemetryInfo() : Telemetry\Info {
        return $this->telemetryInfo;
    }
    public function test() : Test {
        return $this->test;
    }
    
    /**
     * @psalm-return non-empty-string
     */
    public function message() : string {
        return $this->message;
    }
    public function asString() : string {
        $message = $this->message;
        if (!empty($message)) {
            $message = PHP_EOL . $message;
        }
        return sprintf('Test Triggered PHPUnit Deprecation (%s)%s', $this->test
            ->id(), $message);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
PhpunitDeprecationTriggered::$message private property @psalm-var non-empty-string
PhpunitDeprecationTriggered::$telemetryInfo private property
PhpunitDeprecationTriggered::$test private property
PhpunitDeprecationTriggered::asString public function Overrides Event::asString
PhpunitDeprecationTriggered::message public function @psalm-return non-empty-string
PhpunitDeprecationTriggered::telemetryInfo public function Overrides Event::telemetryInfo
PhpunitDeprecationTriggered::test public function
PhpunitDeprecationTriggered::__construct public function @psalm-param non-empty-string $message

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal