You are here

function simpletest_process_phpunit_results in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/simpletest.module \simpletest_process_phpunit_results()

Inserts the parsed PHPUnit results into {simpletest}.

Parameters

array[] $phpunit_results: An array of test results returned from simpletest_phpunit_xml_to_rows().

1 call to simpletest_process_phpunit_results()
simpletest_run_tests in core/modules/simpletest/simpletest.module
Runs tests.

File

core/modules/simpletest/simpletest.module, line 212
Provides testing functionality.

Code

function simpletest_process_phpunit_results($phpunit_results) {

  // Insert the results of the PHPUnit test run into the database so the results
  // are displayed along with Simpletest's results.
  if (!empty($phpunit_results)) {
    $query = TestBase::getDatabaseConnection()
      ->insert('simpletest')
      ->fields(array_keys($phpunit_results[0]));
    foreach ($phpunit_results as $result) {
      $query
        ->values($result);
    }
    $query
      ->execute();
  }
}