You are here

class DrupalTestSuite in SimpleTest 6

Same name and namespace in other branches
  1. 5 drupal_unit_tests.php \DrupalTestSuite

Implementes getTestInstances to allow access to the test objects from outside

Hierarchy

Expanded class hierarchy of DrupalTestSuite

File

./drupal_unit_tests.php, line 5

View source
class DrupalTestSuite extends TestSuite {
  var $_cleanupModules = [];
  function DrupalTestSuite($label) {
    $this
      ->TestSuite($label);
  }

  /**
   * @return array of instantiated tests that this GroupTests holds
   */
  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;
  }

}

Members