You are here

function simpletest_last_test_get in SimpleTest 7

Same name and namespace in other branches
  1. 8.3 simpletest.module \simpletest_last_test_get()
  2. 6.2 simpletest.module \simpletest_last_test_get()
  3. 7.2 simpletest.module \simpletest_last_test_get()
1 call to simpletest_last_test_get()
_simpletest_batch_finished in ./simpletest.module

File

./simpletest.module, line 253
Provides testing functionality.

Code

function simpletest_last_test_get($test_id) {
  $last_prefix = db_query_range('SELECT last_prefix FROM {simpletest_test_id} WHERE test_id = :test_id', 0, 1, array(
    ':test_id' => $test_id,
  ))
    ->fetchField();
  $last_test_class = db_query_range('SELECT test_class FROM {simpletest} WHERE test_id = :test_id ORDER BY message_id DESC', 0, 1, array(
    ':test_id' => $test_id,
  ))
    ->fetchField();
  return array(
    $last_prefix,
    $last_test_class,
  );
}