summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 22:46:22 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 22:46:22 +0000
commit4d20274076d4cf4338531333fb4acb23a231e907 (patch)
treecf610400ab292e6458cccfafd8f3b9ec37766db2 /modules/simpletest/tests
parent11074d9120ef1e4a2d9e7a78486d2df0f1d81c32 (diff)
downloadbrdo-4d20274076d4cf4338531333fb4acb23a231e907.tar.gz
brdo-4d20274076d4cf4338531333fb4acb23a231e907.tar.bz2
#253569 by aaron, agentrickard, and Dave Reid: Add hook_modules_X to allow modules to react when other modules are enabled, disabled, installed, or uninstalled.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/system_test.module36
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module
index d3db9b587..188facc96 100644
--- a/modules/simpletest/tests/system_test.module
+++ b/modules/simpletest/tests/system_test.module
@@ -84,3 +84,39 @@ function system_test_redirect_invalid_scheme() {
function system_test_destination() {
return 'The destination: ' . drupal_get_destination();
}
+
+/**
+ * Implementation of hook_modules_installed().
+ */
+function system_test_modules_installed($modules) {
+ if (in_array('aggregator', $modules)) {
+ drupal_set_message(t('hook_modules_installed fired for aggregator'));
+ }
+}
+
+/**
+ * Implementation of hook_modules_enabled().
+ */
+function system_test_modules_enabled($modules) {
+ if (in_array('aggregator', $modules)) {
+ drupal_set_message(t('hook_modules_enabled fired for aggregator'));
+ }
+}
+
+/**
+ * Implementation of hook_modules_disabled().
+ */
+function system_test_modules_disabled($modules) {
+ if (in_array('aggregator', $modules)) {
+ drupal_set_message(t('hook_modules_disabled fired for aggregator'));
+ }
+}
+
+/**
+ * Implementation of hook_modules_uninstalled().
+ */
+function system_test_modules_uninstalled($modules) {
+ if (in_array('aggregator', $modules)) {
+ drupal_set_message(t('hook_modules_uninstalled fired for aggregator'));
+ }
+}