function DrupalTestSuite::getTestInstances in SimpleTest 5
Same name and namespace in other branches
- 6 drupal_unit_tests.php \DrupalTestSuite::getTestInstances()
Return value
array of instantiated tests that this GroupTests holds
File
- ./
drupal_unit_tests.php, line 15
Class
- DrupalTestSuite
- Implementes getTestInstances to allow access to the test objects from outside
Code
function getTestInstances() {
for ($i = 0, $count = count($this->_test_cases); $i < $count; $i++) {
if (is_string($this->_test_cases[$i])) {
$class = $this->_test_cases[$i];
$this->_test_cases[$i] =& new $class();
}
}
return $this->_test_cases;
}