public function SimpleTestTest::getTestIdFromResults in Drupal 8
Fetch the test id from the test results.
1 call to SimpleTestTest::getTestIdFromResults()
- SimpleTestTest::confirmStubTestResults in core/
modules/ simpletest/ src/ Tests/ SimpleTestTest.php - Confirm that the stub test produced the desired results.
File
- core/
modules/ simpletest/ src/ Tests/ SimpleTestTest.php, line 280
Class
- SimpleTestTest
- Tests SimpleTest's web interface: check that the intended tests were run and ensure that test reports display the intended results. Also test SimpleTest's internal browser and APIs implicitly.
Namespace
Drupal\simpletest\TestsCode
public function getTestIdFromResults() {
foreach ($this->childTestResults['assertions'] as $assertion) {
if (preg_match('@^Test ID is ([0-9]*)\\.$@', $assertion['message'], $matches)) {
return $matches[1];
}
}
return NULL;
}