You are here

function simpletest_phpunit_xml_to_rows in Drupal 8

Converts PHPUnit's JUnit XML output to an array.

Parameters

$test_id: The current test ID.

$phpunit_xml_file: Path to the PHPUnit XML file.

Return value

array[]|null The results as array of rows in a format that can be inserted into {simpletest}. If the phpunit_xml_file does not have any contents then the function will return NULL.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Test\JUnitConverter::xmlToRows() instead.

See also

https://www.drupal.org/node/2948547

1 call to simpletest_phpunit_xml_to_rows()
PhpUnitErrorTest::testPhpUnitXmlParsing in core/modules/simpletest/tests/src/Kernel/PhpUnitErrorTest.php
Test errors reported.

File

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

Code

function simpletest_phpunit_xml_to_rows($test_id, $phpunit_xml_file) {
  @trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \\Drupal\\Core\\Test\\JUnitConverter::xmlToRows() instead. See https://www.drupal.org/node/2948547', E_USER_DEPRECATED);
  return JUnitConverter::xmlToRows($test_id, $phpunit_xml_file) ?: NULL;
}