function JunitXmlLogger::createTestCase
@psalm-assert !null $this->currentTestCase
Throws
3 calls to JunitXmlLogger::createTestCase()
- JunitXmlLogger::handleFault in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php - JunitXmlLogger::handleIncompleteOrSkipped in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php - JunitXmlLogger::testPreparationStarted in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php
File
-
vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php, line 426
Class
- JunitXmlLogger
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Logging\JUnitCode
private function createTestCase(Errored|Failed|MarkedIncomplete|PreparationStarted|Prepared|Skipped $event) : void {
$testCase = $this->document
->createElement('testcase');
$test = $event->test();
$testCase->setAttribute('name', $this->name($test));
$testCase->setAttribute('file', $test->file());
if ($test->isTestMethod()) {
assert($test instanceof TestMethod);
$testCase->setAttribute('line', (string) $test->line());
$testCase->setAttribute('class', $test->className());
$testCase->setAttribute('classname', str_replace('\\', '.', $test->className()));
}
$this->currentTestCase = $testCase;
$this->time = $event->telemetryInfo()
->time();
}