Commit 0e4742c5 authored by webchick's avatar webchick

Issue #1503224 by catch, sun, chx, bojanz, tim.plunkett: Cleanup module_list().

parent f82ad874
......@@ -380,7 +380,7 @@ function drupal_install_system() {
// Clear out module list and hook implementation statics before calling
// system_rebuild_theme_data().
drupal_static_reset('system_list');
system_list_reset();
module_list_reset();
module_implements_reset();
......
......@@ -73,7 +73,7 @@ function drupal_get_complete_schema($rebuild = FALSE) {
// we force the system_list() static cache to be refreshed to ensure
// that it contains the complete list of modules before we go on to call
// module_load_all_includes().
drupal_static_reset('system_list');
system_list_reset();
module_load_all_includes('install');
}
......
......@@ -789,7 +789,7 @@ protected function tearDown() {
// Reload module list and implementations to ensure that test module hooks
// aren't called after tests.
drupal_static_reset('system_list');
system_list_reset();
module_list_reset();
module_implements_reset();
......
......@@ -132,7 +132,7 @@ function assertNoModuleConfig($module) {
* Expected module state.
*/
function assertModules(array $modules, $enabled) {
drupal_static_reset('system_list');
system_list_reset();
foreach ($modules as $module) {
if ($enabled) {
$message = 'Module "@module" is enabled.';
......
......@@ -48,7 +48,7 @@ function testMainContentFallback() {
$edit['modules[Core][block][enable]'] = FALSE;
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
drupal_static_reset('system_list');
system_list_reset();
$this->assertFalse(module_exists('block'), t('Block module disabled.'));
// At this point, no region is filled and fallback should be triggered.
......@@ -82,7 +82,7 @@ function testMainContentFallback() {
$edit['modules[Core][block][enable]'] = 'block';
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
drupal_static_reset('system_list');
system_list_reset();
$this->assertTrue(module_exists('block'), t('Block module re-enabled.'));
}
}
......@@ -253,7 +253,8 @@ protected function performUpgrade($register_errors = TRUE) {
// Reload module list. For modules that are enabled in the test database,
// but not on the test client, we need to load the code here.
$new_modules = array_diff(module_list(TRUE), $this->loadedModules);
system_list_reset();
$new_modules = array_diff(module_list(), $this->loadedModules);
foreach ($new_modules as $module) {
drupal_load('module', $module);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment