function SimpletestTestRunResultsStorage::getLogEntriesByTestClass

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php \Drupal\Core\Test\SimpletestTestRunResultsStorage::getLogEntriesByTestClass()

Get test results for a test run, ordered by test class.

Parameters

\Drupal\Core\Test\TestRun $test_run: The test run object.

Return value

array Array of results ordered by test class and message id.

Overrides TestRunResultsStorageInterface::getLogEntriesByTestClass

File

core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php, line 111

Class

SimpletestTestRunResultsStorage
Implements a test run results storage compatible with legacy Simpletest.

Namespace

Drupal\Core\Test

Code

public function getLogEntriesByTestClass(TestRun $test_run) : array {
    return $this->connection
        ->select('simpletest')
        ->fields('simpletest')
        ->condition('test_id', $test_run->id())
        ->orderBy('test_class')
        ->orderBy('message_id')
        ->execute()
        ->fetchAll();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.