File: entity_cache_test.module

package info (click to toggle)
drupal7 7.14-2%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,516 kB
  • sloc: php: 42,979; pascal: 39,064; sh: 1,622; xml: 441; makefile: 14; sql: 1
file content (27 lines) | stat: -rw-r--r-- 873 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
  }
}