function PhpUnitTestRunner::processPhpUnitResults

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Test/PhpUnitTestRunner.php \Drupal\Core\Test\PhpUnitTestRunner::processPhpUnitResults()
  2. 10 core/lib/Drupal/Core/Test/PhpUnitTestRunner.php \Drupal\Core\Test\PhpUnitTestRunner::processPhpUnitResults()

Logs the parsed PHPUnit results into the test run.

Parameters

\Drupal\Core\Test\TestRun $test_run: The test run object.

array[] $phpunit_results: An array of test results, as returned from \Drupal\Core\Test\JUnitConverter::xmlToRows(). Can be the return value of PhpUnitTestRunner::execute().

1 call to PhpUnitTestRunner::processPhpUnitResults()
PhpUnitTestRunner::processPhpUnitOnSingleTestClassOutcome in core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
Processes PHPUnit test execution output.

File

core/lib/Drupal/Core/Test/PhpUnitTestRunner.php, line 317

Class

PhpUnitTestRunner
Run PHPUnit-based tests.

Namespace

Drupal\Core\Test

Code

public function processPhpUnitResults(TestRun $test_run, array $phpunit_results) : void {
  foreach ($phpunit_results as $result) {
    if (!$test_run->insertLogEntry($result)) {
      throw new \RuntimeException('Failed insertion of a test log entry');
    }
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.