You are here

function DrupalUnitTests::_addClassToGroups in SimpleTest 5

Same name and namespace in other branches
  1. 6 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 84

Class

DrupalUnitTests

Code

function _addClassToGroups(&$groups, $class) {
  $test =& new $class();
  if (method_exists($test, 'get_info')) {
    $info = $test
      ->get_info();
    $groups[$info['group']][] = $test;
  }
}