You are here

function simpletest_get_total_test in SimpleTest 5

Same name and namespace in other branches
  1. 6 simpletest.module \simpletest_get_total_test()

This function makes sure no unnecessary copies of the DrupalUnitTests object are instantiated

Parameters

array $classes list of all classes the test should concern or: DEFAULT NULL

Return value

DrupalUnitTests object

2 calls to simpletest_get_total_test()
simpletest_overview_form in ./simpletest.module
Create simpletest_overview_form
simpletest_run_tests in ./simpletest.module
Actually runs tests

File

./simpletest.module, line 258

Code

function &simpletest_get_total_test($classes = NULL) {
  static $total_test;
  if (!$total_test) {
    if (!simpletest_load()) {
      return FALSE;
    }
    $total_test =& new DrupalUnitTests();
  }
  if (!is_null($classes)) {
    return new DrupalUnitTests($classes);
  }
  return $total_test;
}