diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-15 04:44:08 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-15 04:44:08 +0000 |
commit | 063fe4821daef625278d12d323631c6014714a85 (patch) | |
tree | 4e98c264ac13da1f6c5c24b8818f9e8aed81bc0f /modules/simpletest | |
parent | 6c2b8b7db9e955507d329f6f5d04a6bbd5c09ad2 (diff) | |
download | brdo-063fe4821daef625278d12d323631c6014714a85.tar.gz brdo-063fe4821daef625278d12d323631c6014714a85.tar.bz2 |
#742972 follow-up by klausi, sun: Fix documentation and tests regarding entity cache clearing.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/entity_cache_test.module | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/modules/simpletest/tests/entity_cache_test.module b/modules/simpletest/tests/entity_cache_test.module index ce9d7eba9..b1daf683f 100644 --- a/modules/simpletest/tests/entity_cache_test.module +++ b/modules/simpletest/tests/entity_cache_test.module @@ -9,14 +9,20 @@ /** * Implements hook_watchdog(). * - * This function is called during module_enable() and tries to access entity - * information provided by the module this one depends on. The information is - * stored in a temporary system variable and is later analyzed in the test - * case. + * 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() { - $info = entity_get_info('entity_cache_test'); - variable_set('entity_cache_test', $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); + } } |