diff --git includes/module.inc includes/module.inc index 4af068e..5b4af1e 100644 --- includes/module.inc +++ includes/module.inc @@ -369,6 +369,9 @@ function module_enable($module_list, $enable_dependencies = TRUE) { registry_update(); // Refresh the schema to include it. drupal_get_schema(NULL, TRUE); + // Clear entity cache. + drupal_static_reset('entity_get_info'); + cache_clear_all('entity_info', 'cache', TRUE); // Now install the module if necessary. if (drupal_get_installed_schema_version($module, TRUE) == SCHEMA_UNINSTALLED) { diff --git modules/system/system.test modules/system/system.test index 42bb46b..a5c1377 100644 --- modules/system/system.test +++ modules/system/system.test @@ -177,11 +177,11 @@ class ModuleDependencyTestCase extends ModuleTestCase { function testEnableWithoutDependency() { // Attempt to enable content translation without locale enabled. $edit = array(); - $edit['modules[Core][translation][enable]'] = 'translation'; + $edit['modules[Rules][rules][enable]'] = 'rules'; $this->drupalPost('admin/modules', $edit, t('Save configuration')); $this->assertText(t('Some required modules must be enabled'), t('Dependecy required.')); - $this->assertModules(array('translation', 'locale'), FALSE); + $this->assertModules(array('rules', 'entity', 'entity_metadata'), FALSE); // Assert that the locale tables weren't enabled. $this->assertTableCount('languages', FALSE); @@ -190,11 +190,11 @@ class ModuleDependencyTestCase extends ModuleTestCase { $this->drupalPost(NULL, NULL, t('Continue')); $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.')); - $this->assertModules(array('translation', 'locale'), TRUE); + $this->assertModules(array('rules', 'entity', 'entity_metadata'), TRUE); // Assert that the locale tables were enabled. - $this->assertTableCount('languages', TRUE); - $this->assertTableCount('locale', TRUE); + //$this->assertTableCount('languages', TRUE); + //$this->assertTableCount('locale', TRUE); } /**