class DataProviderMethodFinished
@psalm-immutable
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Event\Test\DataProviderMethodFinished implements \PHPUnit\Event\Event
Expanded class hierarchy of DataProviderMethodFinished
1 file declares its use of DataProviderMethodFinished
- DispatchingEmitter.php in vendor/
phpunit/ phpunit/ src/ Event/ Emitter/ DispatchingEmitter.php
File
-
vendor/
phpunit/ phpunit/ src/ Event/ Events/ Test/ Lifecycle/ DataProviderMethodFinished.php, line 24
Namespace
PHPUnit\Event\TestView source
final class DataProviderMethodFinished implements Event {
private readonly Telemetry\Info $telemetryInfo;
private readonly ClassMethod $testMethod;
/**
* @psalm-var list<ClassMethod>
*/
private readonly array $calledMethods;
public function __construct(Telemetry\Info $telemetryInfo, ClassMethod $testMethod, ClassMethod ...$calledMethods) {
$this->telemetryInfo = $telemetryInfo;
$this->testMethod = $testMethod;
$this->calledMethods = $calledMethods;
}
public function telemetryInfo() : Telemetry\Info {
return $this->telemetryInfo;
}
public function testMethod() : ClassMethod {
return $this->testMethod;
}
/**
* @psalm-return list<Code\ClassMethod>
*/
public function calledMethods() : array {
return $this->calledMethods;
}
public function asString() : string {
$buffer = sprintf('Data Provider Method Finished for %s::%s:', $this->testMethod
->className(), $this->testMethod
->methodName());
foreach ($this->calledMethods as $calledMethod) {
$buffer .= sprintf(PHP_EOL . '- %s::%s', $calledMethod->className(), $calledMethod->methodName());
}
return $buffer;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
DataProviderMethodFinished::$calledMethods | private | property | @psalm-var list<ClassMethod> | |
DataProviderMethodFinished::$telemetryInfo | private | property | ||
DataProviderMethodFinished::$testMethod | private | property | ||
DataProviderMethodFinished::asString | public | function | Overrides Event::asString | |
DataProviderMethodFinished::calledMethods | public | function | @psalm-return list<Code\ClassMethod> | |
DataProviderMethodFinished::telemetryInfo | public | function | Overrides Event::telemetryInfo | |
DataProviderMethodFinished::testMethod | public | function | ||
DataProviderMethodFinished::__construct | public | function |