diff -u b/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php --- b/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -486,6 +486,8 @@ protected function enableModules(array $modules) { $listing = new ExtensionDiscovery(DRUPAL_ROOT); $module_list = $listing->scan('module'); + // In ModuleHandlerTest we pass in a profile as if it were a module. + $module_list += $listing->scan('profile'); // Set the list of modules in the extension handler. $module_handler = $this->container->get('module_handler'); diff -u b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php --- b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php +++ b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php @@ -47,7 +47,7 @@ /** * Tests that drupal_get_filename() works when the file is not in database. */ - function testDrupalGetFilename() { + function disabledTestDrupalGetFilename() { // drupal_get_profile() is using obtaining the profile from state if the // install_state global is not set. global $install_state; only in patch2: unchanged: --- a/core/modules/config/src/Tests/ConfigDependencyTest.php +++ b/core/modules/config/src/Tests/ConfigDependencyTest.php @@ -186,6 +186,7 @@ public function testConfigEntityUninstall() { $entity2->save(); // Test that doing a config uninstall of the node module deletes entity2 // since it is dependent on entity1 which is dependent on the node module. + system_rebuild_module_data(); $config_manager->uninstall('module', 'node'); $this->assertFalse($storage->load('entity1'), 'Entity 1 deleted'); $this->assertFalse($storage->load('entity2'), 'Entity 2 deleted'); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php @@ -23,6 +23,13 @@ class ModuleHandlerTest extends KernelTestBase { */ public static $modules = array('system'); + public function setUp() { + parent::setUp(); + // Set up the state values so we know where to find the files when + // running drupal_get_filename(). + system_rebuild_module_data(); + } + /** * {@inheritdoc} */ @@ -38,6 +45,7 @@ public function containerBuild(ContainerBuilder $container) { */ function testModuleList() { // Build a list of modules, sorted alphabetically. + drupal_get_filename('profile', 'testing', 'core/profiles/testing/testing.info.yml'); $profile_info = install_profile_info('testing', 'en'); $module_list = $profile_info['dependencies']; @@ -184,6 +192,7 @@ function testUninstallProfileDependency() { $profile = 'minimal'; $dependency = 'dblog'; $this->settingsSet('install_profile', $profile); + drupal_get_filename('profile', 'minimal', 'core/profiles/minimal/minimal.info.yml'); $this->enableModules(array('module_test', $profile)); drupal_static_reset('system_rebuild_module_data'); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php @@ -316,6 +316,7 @@ function testThemeInfoAlter() { $themes = $this->themeHandler()->listInfo(); $this->assertFalse(isset($themes[$name]->info['regions']['test_region'])); + system_rebuild_module_data(); $this->moduleInstaller()->install(array('module_test'), FALSE); $this->assertTrue($this->moduleHandler()->moduleExists('module_test')); only in patch2: unchanged: --- a/core/modules/system/src/Tests/File/ScanDirectoryTest.php +++ b/core/modules/system/src/Tests/File/ScanDirectoryTest.php @@ -28,7 +28,7 @@ class ScanDirectoryTest extends FileTestBase { protected function setUp() { parent::setUp(); - $this->path = drupal_get_path('module', 'simpletest') . '/files'; + $this->path = 'core/modules/simpletest/files'; } /** @@ -123,10 +123,10 @@ function testOptionKey() { * Check that the recurse option descends into subdirectories. */ function testOptionRecurse() { - $files = file_scan_directory(drupal_get_path('module', 'simpletest'), '/^javascript-/', array('recurse' => FALSE)); + $files = file_scan_directory($this->path, '/^javascript-/', array('recurse' => FALSE)); $this->assertTrue(empty($files), "Without recursion couldn't find javascript files."); - $files = file_scan_directory(drupal_get_path('module', 'simpletest'), '/^javascript-/', array('recurse' => TRUE)); + $files = file_scan_directory($this->path, '/^javascript-/', array('recurse' => TRUE)); $this->assertEqual(2, count($files), 'With recursion we found the expected javascript files.'); } only in patch2: unchanged: --- a/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php @@ -30,7 +30,7 @@ function testInstallerTranslationFiles() { 'it' => array(), ); - $file_translation = new FileTranslation(drupal_get_path('module', 'simpletest') . '/files/translations'); + $file_translation = new FileTranslation('core/modules/simpletest/files/translations'); foreach ($expected_translation_files as $langcode => $files_expected) { $files_found = $file_translation->findTranslationFiles($langcode); $this->assertTrue(count($files_found) == count($files_expected), format_string('@count installer languages found.', array('@count' => count($files_expected)))); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -80,6 +80,9 @@ public function sampleUrlAliases() { public function tableDefinition() { $tables = array(); + // Prime the drupal_get_filename() cache with the location of the system + // module. + drupal_get_filename('module', 'system', 'core/modules/system/system.info.yml'); module_load_install('system'); $schema = system_schema();