function JUnitConverterTest::testConvertTestCaseToSimpletestRow
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php \Drupal\Tests\Core\Test\JUnitConverterTest::testConvertTestCaseToSimpletestRow()
- 8.9.x core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php \Drupal\Tests\Core\Test\JUnitConverterTest::testConvertTestCaseToSimpletestRow()
- 11.x core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php \Drupal\Tests\Core\Test\JUnitConverterTest::testConvertTestCaseToSimpletestRow()
@covers ::convertTestCaseToSimpletestRow
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ JUnitConverterTest.php, line 87
Class
Namespace
Drupal\Tests\Core\TestCode
public function testConvertTestCaseToSimpletestRow() : void {
$junit = <<<EOD
<testcase name="testGetTestClasses" class="Drupal\\Tests\\simpletest\\Unit\\TestDiscoveryTest" classname="Drupal.Tests.simpletest.Unit.TestDiscoveryTest" file="/Users/paul/projects/drupal/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php" line="108" assertions="2" time="0.100787"/>
EOD;
$simpletest = [
'test_id' => 23,
'test_class' => 'Drupal\\Tests\\simpletest\\Unit\\TestDiscoveryTest',
'status' => 'pass',
'message' => '',
'message_group' => 'Other',
'function' => 'Drupal\\Tests\\simpletest\\Unit\\TestDiscoveryTest->testGetTestClasses()',
'line' => 108,
'file' => '/Users/paul/projects/drupal/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php',
];
$this->assertEquals($simpletest, JUnitConverter::convertTestCaseToSimpletestRow(23, new \SimpleXMLElement($junit)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.