function SimpleTestTest::getTestIdFromResults

Fetch the test id from the test results.

1 call to SimpleTestTest::getTestIdFromResults()
SimpleTestTest::confirmStubTestResults in drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
Confirm that the stub test produced the desired results.

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php, line 237
Definition of Drupal\simpletest\Tests\SimpleTestTest.

Class

SimpleTestTest

Namespace

Drupal\simpletest\Tests

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;
}