public static function TestDatabase::processPhpUnitResults in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Test/TestDatabase.php \Drupal\Core\Test\TestDatabase::processPhpUnitResults()
Inserts the parsed PHPUnit results into {simpletest}.
@internal
Parameters
array[] $phpunit_results: An array of test results, as returned from \Drupal\Core\Test\JUnitConverter::xmlToRows(). These results are in a form suitable for inserting into the {simpletest} table of the test results database.
2 calls to TestDatabase::processPhpUnitResults()
- simpletest_process_phpunit_results in core/
modules/ simpletest/ simpletest.module - Inserts the parsed PHPUnit results into {simpletest}.
- _simpletest_batch_operation in core/
modules/ simpletest/ simpletest.module - Implements callback_batch_operation().
File
- core/
lib/ Drupal/ Core/ Test/ TestDatabase.php, line 420
Class
- TestDatabase
- Provides helper methods for interacting with the fixture database.
Namespace
Drupal\Core\TestCode
public static function processPhpUnitResults($phpunit_results) {
if ($phpunit_results) {
$query = static::getConnection()
->insert('simpletest')
->fields(array_keys($phpunit_results[0]));
foreach ($phpunit_results as $result) {
$query
->values($result);
}
$query
->execute();
}
}