public function PHPUnit_Util_Log_JUnit::endTest

A test ended.

Parameters

PHPUnit_Framework_Test $test:

float $time:

Overrides PHPUnit_Framework_TestListener::endTest

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JUnit.php, line 425

Class

PHPUnit_Util_Log_JUnit
A TestListener that generates a logfile of the test execution in XML markup.

Code

public function endTest(PHPUnit_Framework_Test $test, $time) {
  if (!$test instanceof PHPUnit_Framework_Warning) {
    if ($this->attachCurrentTestCase) {
      if ($test instanceof PHPUnit_Framework_TestCase) {
        $numAssertions = $test
          ->getNumAssertions();
        $this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions;
        $this->currentTestCase
          ->setAttribute('assertions', $numAssertions);
      }
      $this->currentTestCase
        ->setAttribute('time', sprintf('%F', $time));
      $this->testSuites[$this->testSuiteLevel]
        ->appendChild($this->currentTestCase);
      $this->testSuiteTests[$this->testSuiteLevel]++;
      $this->testSuiteTimes[$this->testSuiteLevel] += $time;
    }
  }
  $this->attachCurrentTestCase = TRUE;
  $this->currentTestCase = NULL;
}