entity_cache_test.module 873 B

123456789101112131415161718192021222324252627
  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. }