function simpletest_registry_files_alter in SimpleTest 7
Same name and namespace in other branches
- 7.2 simpletest.module \simpletest_registry_files_alter()
Implementation of hook_registry_files_alter().
Add the test files for disabled modules so that we get a list containing all the avialable tests.
File
- ./
simpletest.module, line 378 - 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,
);
}
}
}
}
}
}