function simpletest_registry_files_alter

7.x simpletest.module simpletest_registry_files_alter(&$files, $modules)

Implements hook_registry_files_alter().

Add the test files for disabled modules so that we get a list containing all the avialable tests.

File

drupal-7.x/modules/simpletest/simpletest.module, line 469
Provides testing functionality.

Code

function simpletest_registry_files_alter(&$files, $modules) {
  foreach ($modules as $module) {
    // Only add test files for disabled modules, as enabled modules should
    // already include any test files they provide.
    if (!$module->status) {
      $dir = $module->dir;
      if (!empty($module->info['files'])) {
        foreach ($module->info['files'] as $file) {
          if (substr($file, -5) == '.test') {
            $files["$dir/$file"] = array('module' => $module->name, 'weight' => $module->weight);
          }
        }
      }
    }
  }
}