JUnitConverter
class JUnitConverter (View source)
Converts JUnit XML to Drupal's {simpletest} schema.
This is mainly for converting PHPUnit test results.
This class is @internal and not considered to be API.
Methods
static array[]
xmlToRows(int $test_id, string $phpunit_xml_file)
Converts PHPUnit's JUnit XML output file to {simpletest} schema.
static array[]
xmlElementToRows(int $test_id, SimpleXMLElement $element)
Parse test cases from XML to {simpletest} schema.
static array
findTestCases(SimpleXMLElement $element, SimpleXMLElement $parent = NULL)
Finds all test cases recursively from a test suite list.
static array
convertTestCaseToSimpletestRow(int $test_id, SimpleXMLElement $test_case)
Converts a PHPUnit test case result to a {simpletest} result row.
Details
static array[]
xmlToRows(int $test_id, string $phpunit_xml_file)
| internal |
Converts PHPUnit's JUnit XML output file to {simpletest} schema.
static array[]
xmlElementToRows(int $test_id, SimpleXMLElement $element)
| internal |
Parse test cases from XML to {simpletest} schema.
static array
findTestCases(SimpleXMLElement $element, SimpleXMLElement $parent = NULL)
| internal |
Finds all test cases recursively from a test suite list.
static array
convertTestCaseToSimpletestRow(int $test_id, SimpleXMLElement $test_case)
| internal |
Converts a PHPUnit test case result to a {simpletest} result row.