entity_cache_test.module

You are here

  1. 7 modules/simpletest/tests/entity_cache_test.module
  2. 8 core/modules/system/tests/modules/entity_cache_test/entity_cache_test.module

Helper module for entity cache tests.

Functions

Namesort descending Description
entity_cache_test_watchdog Implements hook_watchdog().

File

modules/simpletest/tests/entity_cache_test.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * Helper module for entity cache tests.
  5. */
  6. /**
  7. * Implements hook_watchdog().
  8. *
  9. * This hook is called during module_enable() and since this hook
  10. * implementation is invoked, we have to expect that this module and dependent
  11. * modules have been properly installed already. So we expect to be able to
  12. * retrieve the entity information that has been registered by the required
  13. * dependency module.
  14. *
  15. * @see EnableDisableTestCase::testEntityCache()
  16. * @see entity_cache_test_dependency_entity_info()
  17. */
  18. function entity_cache_test_watchdog($log_entry) {
  19. if ($log_entry['type'] == 'system' && $log_entry['message'] == '%module module installed.') {
  20. $info = entity_get_info('entity_cache_test');
  21. // Store the information in a system variable to analyze it later in the
  22. // test case.
  23. variable_set('entity_cache_test', $info);
  24. }
  25. }