summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-28 19:06:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-28 19:06:16 +0000
commit12d6d6662eb6300e9ea00fc39440f209b99d86d4 (patch)
tree9398119b45febdc33a1578f9f5712be328cff939 /modules/simpletest
parent3625dddf1174adce9dd988c7139e2a58b9245f52 (diff)
downloadbrdo-12d6d6662eb6300e9ea00fc39440f209b99d86d4.tar.gz
brdo-12d6d6662eb6300e9ea00fc39440f209b99d86d4.tar.bz2
- Patch #211747 by chx, alex_b, dww: allow specifying version information as part of module dependencies.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/system_test.module20
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';
+ }
+ }
+}
+