summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module')
-rw-r--r--kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module27
1 files changed, 27 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module b/kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module
new file mode 100644
index 0000000..5ae9ecc
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/simpletest/tests/entity_cache_test.module
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @file
+ * Helper module for entity cache tests.
+ */
+
+/**
+ * Implements hook_watchdog().
+ *
+ * This hook is called during module_enable() and since this hook
+ * implementation is invoked, we have to expect that this module and dependent
+ * modules have been properly installed already. So we expect to be able to
+ * retrieve the entity information that has been registered by the required
+ * dependency module.
+ *
+ * @see EnableDisableTestCase::testEntityCache()
+ * @see entity_cache_test_dependency_entity_info()
+ */
+function entity_cache_test_watchdog($log_entry) {
+ if ($log_entry['type'] == 'system' && $log_entry['message'] == '%module module installed.') {
+ $info = entity_get_info('entity_cache_test');
+ // Store the information in a system variable to analyze it later in the
+ // test case.
+ variable_set('entity_cache_test', $info);
+ }
+}