public static function TestDatabase::processPhpUnitResults in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Test/TestDatabase.php \Drupal\Core\Test\TestDatabase::processPhpUnitResults()
- 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.
File
- core/
lib/ Drupal/ Core/ Test/ TestDatabase.php, line 417
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();
}
}