protected function SimpletestResultsForm::getResults

Get test results for $test_id.

Parameters

int $test_id: The test_id to retrieve results of.

Return value

array Array of results grouped by test_class.

1 call to SimpletestResultsForm::getResults()
SimpletestResultsForm::buildForm in drupal/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php
Form constructor.

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php, line 278
Contains \Drupal\simpletest\Form\SimpletestResultsForm.

Class

SimpletestResultsForm
Test results form for $test_id.

Namespace

Drupal\simpletest\Form

Code

protected function getResults($test_id) {
  $results = $this->database
    ->select('simpletest')
    ->fields('simpletest')
    ->condition('test_id', $test_id)
    ->orderBy('test_class')
    ->orderBy('message_id')
    ->execute();
  $test_results = array();
  foreach ($results as $result) {
    if (!isset($test_results[$result->test_class])) {
      $test_results[$result->test_class] = array();
    }
    $test_results[$result->test_class][] = $result;
  }
  return $test_results;
}