diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php index 233693c..6f80459 100644 --- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php @@ -24,14 +24,14 @@ class ModuleHandlerTest extends KernelTestBase { protected function setUp() { parent::setUp(); + // @todo ModuleInstaller calls system_rebuild_module_data which is part of + // system.module, see https://www.drupal.org/node/2208429 + include_once $this->root . '/core/modules/system/system.module'; + // Set up the state values so we know where to find the files when running // drupal_get_filename(). // @todo Remove as part of https://www.drupal.org/node/2186491 system_rebuild_module_data(); - - // @todo ModuleInstaller calls system_rebuild_module_data which is part of - // system.module, see https://www.drupal.org/node/2208429 - include_once $this->root . '/core/modules/system/system.module'; } /** @@ -50,15 +50,6 @@ public function containerBuild(ContainerBuilder $container) { function testModuleList() { $module_list = array(); - // Prime the drupal_get_filename() static cache with the location of the - // testing profile as it is not the currently active profile and we don't - // yet have any cached way to retrieve its location. - // @todo Remove as part of https://www.drupal.org/node/2186491 - drupal_get_filename('profile', 'testing', 'core/profiles/testing/testing.info.yml'); - // Build a list of modules, sorted alphabetically. - $profile_info = install_profile_info('testing', 'en'); - $module_list = $profile_info['dependencies']; - $this->assertModuleList($module_list, 'Initial'); // Try to install a new module. @@ -193,6 +184,11 @@ function testUninstallProfileDependency() { $profile = 'minimal'; $dependency = 'dblog'; $this->setSetting('install_profile', $profile); + // Prime the drupal_get_filename() static cache with the location of the + // minimal profile as it is not the currently active profile and we don't + // yet have any cached way to retrieve its location. + // @todo Remove as part of https://www.drupal.org/node/2186491 + drupal_get_filename('profile', $profile, 'core/profiles/' . $profile . '/' . $profile . '.info.yml'); $this->enableModules(array('module_test', $profile)); drupal_static_reset('system_rebuild_module_data');