function JunitXmlLogger::handleFinish
Throws
3 calls to JunitXmlLogger::handleFinish()
- JunitXmlLogger::handleFault in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php - JunitXmlLogger::handleIncompleteOrSkipped in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php - JunitXmlLogger::testFinished in vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php
File
-
vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php, line 254
Class
- JunitXmlLogger
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Logging\JUnitCode
private function handleFinish(Info $telemetryInfo, int $numberOfAssertionsPerformed) : void {
assert($this->currentTestCase !== null);
assert($this->time !== null);
$time = $telemetryInfo->time()
->duration($this->time)
->asFloat();
$this->testSuiteAssertions[$this->testSuiteLevel] += $numberOfAssertionsPerformed;
$this->currentTestCase
->setAttribute('assertions', (string) $numberOfAssertionsPerformed);
$this->currentTestCase
->setAttribute('time', sprintf('%F', $time));
$this->testSuites[$this->testSuiteLevel]
->appendChild($this->currentTestCase);
$this->testSuiteTests[$this->testSuiteLevel]++;
$this->testSuiteTimes[$this->testSuiteLevel] += $time;
$this->currentTestCase = null;
$this->time = null;
$this->prepared = false;
}