function DrupalUnitTests::_addClassToGroups in SimpleTest 6
Same name and namespace in other branches
- 5 drupal_unit_tests.php \DrupalUnitTests::_addClassToGroups()
Adds a class to a groups array specified by the get_info of the group
Parameters
array $groups Group of categorized tests:
string $class Name of a class:
1 call to DrupalUnitTests::_addClassToGroups()
- DrupalUnitTests::DrupalUnitTests in ./
drupal_unit_tests.php - Constructor
File
- ./
drupal_unit_tests.php, line 87
Class
Code
function _addClassToGroups(&$groups, $class) {
$test =& new $class();
if (method_exists($test, 'get_info')) {
$info = $test
->get_info();
$groups[$info['group']][] = $test;
}
elseif (method_exists($test, 'getInfo')) {
$info = $test
->getInfo();
$groups[$info['group']][] = $test;
}
}