#742972 by klausi, Berdir: Clear entity info cache during module enable. (tests)

merge-requests/26/head
Angie Byron 2010-04-18 15:01:56 +00:00
parent 7e5787d948
commit f62d41af34
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,9 @@
; $Id$
name = "Entity cache test"
description = "Support module for testing entity cache."
package = Testing
version = VERSION
core = 7.x
files[] = entity_cache_test.module
dependencies[] = entity_cache_test_dependency
hidden = TRUE

View File

@ -0,0 +1,22 @@
<?php
// $Id$
/**
* @file
* Helper module for entity cache tests.
*/
/**
* 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.
*
* @see EnableDisableTestCase::testEntityCache()
*/
function entity_cache_test_watchdog() {
$info = entity_get_info('entity_cache_test');
variable_set('entity_cache_test', $info);
}

View File

@ -0,0 +1,8 @@
; $Id$
name = "Entity cache test dependency"
description = "Support dependency module for testing entity cache."
package = Testing
version = VERSION
core = 7.x
files[] = entity_cache_test_dependency.module
hidden = TRUE

View File

@ -0,0 +1,19 @@
<?php
// $Id$
/**
* @file
* Helper module for entity cache tests.
*/
/**
* Implements hook_entity_info().
*/
function entity_cache_test_dependency_entity_info() {
return array(
'entity_cache_test' => array(
'label' => 'Entity Cache Test',
'base table' => 'entity_cache_test',
),
);
}