diff options
Diffstat (limited to 'modules/simpletest/tests/system_test.module')
-rw-r--r-- | modules/simpletest/tests/system_test.module | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module index 07a86afdb..cab3b9e57 100644 --- a/modules/simpletest/tests/system_test.module +++ b/modules/simpletest/tests/system_test.module @@ -165,3 +165,23 @@ function system_test_exit() { watchdog('system_test', 'hook_exit'); } +/** + * Implement hook_system_info_alter(). + */ +function system_test_system_info_alter(&$info, $file) { + // We need a static otherwise the last test will fail to alter common_test. + static $test; + if (($dependencies = variable_get('dependencies', array())) || $test) { + if ($file->name == 'module_test') { + $info['hidden'] = FALSE; + $info['dependencies'][] = array_shift($dependencies); + variable_set('dependencies', $dependencies); + $test = TRUE; + } + if ($file->name == 'common_test') { + $info['hidden'] = FALSE; + $info['version'] = '7.x-2.4'; + } + } +} + |