You are here

function DrupalUnitTests::run in SimpleTest 6

Same name and namespace in other branches
  1. 5 drupal_unit_tests.php \DrupalUnitTests::run()

Invokes run() on all of the held test cases, instantiating them if necessary. The Drupal version uses paintHeader instead of paintGroupStart to avoid collapsing of the very top level.

@access public

Parameters

SimpleReporter $reporter Current test reporter.:

File

./drupal_unit_tests.php, line 109

Class

DrupalUnitTests

Code

function run(&$reporter) {
  cache_clear_all();
  @set_time_limit(0);
  ignore_user_abort(true);

  // Disable devel output, check simpletest settings page
  if (!variable_get('simpletest_devel', false)) {
    $GLOBALS['devel_shutdown'] = FALSE;
  }
  $result = parent::run($reporter);

  // Restores modules
  foreach ($this->_cleanupModules as $name => $status) {
    db_query("UPDATE {system} SET status = %d WHERE name = '%s' AND type = 'module'", $status, $name);
  }
  $this->_cleanupModules = array();
  return $result;
}