class PrintedUnexpectedOutput
@psalm-immutable
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Event\Test\PrintedUnexpectedOutput implements \PHPUnit\Event\Event
Expanded class hierarchy of PrintedUnexpectedOutput
1 file declares its use of PrintedUnexpectedOutput
- UnexpectedOutputPrinter.php in vendor/
phpunit/ phpunit/ src/ TextUI/ Output/ Default/ UnexpectedOutputPrinter.php
File
-
vendor/
phpunit/ phpunit/ src/ Event/ Events/ Test/ PrintedUnexpectedOutput.php, line 22
Namespace
PHPUnit\Event\TestView source
final class PrintedUnexpectedOutput implements Event {
private readonly Telemetry\Info $telemetryInfo;
/**
* @psalm-var non-empty-string
*/
private readonly string $output;
/**
* @psalm-param non-empty-string $output
*/
public function __construct(Telemetry\Info $telemetryInfo, string $output) {
$this->telemetryInfo = $telemetryInfo;
$this->output = $output;
}
public function telemetryInfo() : Telemetry\Info {
return $this->telemetryInfo;
}
/**
* @psalm-return non-empty-string
*/
public function output() : string {
return $this->output;
}
public function asString() : string {
return sprintf('Test Printed Unexpected Output%s%s', PHP_EOL, $this->output);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
PrintedUnexpectedOutput::$output | private | property | @psalm-var non-empty-string | |
PrintedUnexpectedOutput::$telemetryInfo | private | property | ||
PrintedUnexpectedOutput::asString | public | function | Overrides Event::asString | |
PrintedUnexpectedOutput::output | public | function | @psalm-return non-empty-string | |
PrintedUnexpectedOutput::telemetryInfo | public | function | Overrides Event::telemetryInfo | |
PrintedUnexpectedOutput::__construct | public | function | @psalm-param non-empty-string $output |