diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 9035bb2..c945df8 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -1009,7 +1009,7 @@ protected function tearDown() { // Reset module list and module load status. module_list_reset(); - module_load_all(NULL, TRUE); + module_load_all(FALSE, TRUE); // Restore original shutdown callbacks. $callbacks = &drupal_register_shutdown_function(); diff --git a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php index ae9a162..32705bf 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php @@ -22,14 +22,24 @@ public static function getInfo() { ); } + function setUp() { + parent::setUp(); + + // Remove the keyvalue service definition, since this test wants to verify + // the filesystem scan fallback of drupal_get_filename(). + $this->keyvalue_definition = $this->container->getDefinition('keyvalue'); + $this->container->removeDefinition('keyvalue'); + } + + function tearDown() { + $this->container->setDefinition('keyvalue', $this->keyvalue_definition); + parent::tearDown(); + } + /** * Tests that drupal_get_filename() works when the file is not in database. */ function testDrupalGetFilename() { - // Reset the static cache so we can test the "db is not active" code of - // drupal_get_filename(). - drupal_static_reset('drupal_get_filename'); - // Retrieving the location of a module. $this->assertIdentical(drupal_get_filename('module', 'php'), 'core/modules/php/php.module', 'Retrieve module location.'); @@ -50,6 +60,6 @@ function testDrupalGetFilename() { // Since there is already a core/scripts directory, drupal_get_filename() // will automatically check there for 'script' files, just as it does // for (e.g.) 'module' files in core/modules. - $this->assertIdentical(drupal_get_filename('script', 'test'), 'core/scripts/test.script', 'Retrieve test script location.'); + $this->assertIdentical(drupal_get_filename('script', 'test'), 'core/scripts/test/test.script'); } } diff --git a/core/scripts/test.script b/core/scripts/test/test.script similarity index 100% rename from core/scripts/test.script rename to core/scripts/test/test.script