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

Breadcrumb

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

class Errored

@psalm-immutable

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

Hierarchy

  • class \PHPUnit\Event\Test\Errored implements \PHPUnit\Event\Event

Expanded class hierarchy of Errored

13 files declare their use of Errored
Collector.php in vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php
JunitXmlLogger.php in vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php
ProgressPrinter.php in vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php
ResultCacheHandler.php in vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php
TeamCityLogger.php in vendor/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php

... See full list

File

vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php, line 25

Namespace

PHPUnit\Event\Test
View source
final class Errored implements Event {
    private readonly Telemetry\Info $telemetryInfo;
    private readonly Code\Test $test;
    private readonly Throwable $throwable;
    public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable) {
        $this->telemetryInfo = $telemetryInfo;
        $this->test = $test;
        $this->throwable = $throwable;
    }
    public function telemetryInfo() : Telemetry\Info {
        return $this->telemetryInfo;
    }
    public function test() : Code\Test {
        return $this->test;
    }
    public function throwable() : Throwable {
        return $this->throwable;
    }
    public function asString() : string {
        $message = trim($this->throwable
            ->message());
        if (!empty($message)) {
            $message = PHP_EOL . $message;
        }
        return sprintf('Test Errored (%s)%s', $this->test
            ->id(), $message);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Errored::$telemetryInfo private property
Errored::$test private property
Errored::$throwable private property
Errored::asString public function Overrides Event::asString
Errored::telemetryInfo public function Overrides Event::telemetryInfo
Errored::test public function
Errored::throwable public function
Errored::__construct public function
RSS feed
Powered by Drupal