function simpletest_registry_files_alter

Implements hook_registry_files_alter().

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

File

modules/simpletest/simpletest.module, line 497

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,
                        );
                    }
                }
            }
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.