You are here

function simpletest_get_total_test in SimpleTest 6

Same name and namespace in other branches
  1. 5 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
Form callback; make the form to run tests
simpletest_run_tests in ./simpletest.module
Actually runs tests

File

./simpletest.module, line 356

Code

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