You are here

function SimpleTestFunctionalTest::getTestIdFromResults in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 simpletest.test \SimpleTestFunctionalTest::getTestIdFromResults()
  2. 7.2 simpletest.test \SimpleTestFunctionalTest::getTestIdFromResults()

Fetch the test id from the test results.

1 call to SimpleTestFunctionalTest::getTestIdFromResults()
SimpleTestFunctionalTest::confirmStubTestResults in ./simpletest.test
Confirm that the stub test produced the desired results.

File

./simpletest.test, line 166

Class

SimpleTestFunctionalTest

Code

function getTestIdFromResults() {
  foreach ($this->childTestResults['assertions'] as $assertion) {
    if (preg_match('@^Test ID is ([0-9]*)\\.$@', $assertion['message'], $matches)) {
      return $matches[1];
    }
  }
  return NULL;
}