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

Breadcrumb

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

function JunitXmlLogger::handleFinish

Throws

InvalidArgumentException

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\JUnit

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal