Projet

Général

Profil

Paste
Télécharger (873 octets) Statistiques
| Branche: | Révision:

root / drupal7 / modules / simpletest / tests / entity_cache_test.module @ 76597ebf

1
<?php
2

    
3
/**
4
 * @file
5
 * Helper module for entity cache tests.
6
 */
7

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