diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 56e5f43..980d2cf 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2412,7 +2412,7 @@ function drupal_container(Container $reset = NULL) { // which to reinitialize the stored objects, so a drupal_static_reset() call // would leave Drupal in a nonfunctional state. static $container = NULL; - if (isset($reset)) { + if (func_num_args()) { $container = $reset; } elseif (!isset($container)) { diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 25139e6..a6ffe62 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -670,6 +670,8 @@ abstract class WebTestBase extends TestBase { // container in drupal_container(). Drupal\simpletest\TestBase::tearDown() // restores the original container. // @see Drupal\Core\DrupalKernel::initializeContainer() + drupal_container(NULL); + drupal_container(); $this->kernel = new DrupalKernel('testing', FALSE); // Booting the kernel is necessary to initialize the new DIC. While // normally the kernel gets booted on demand in diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 62107ab..c5eb216 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -479,7 +479,7 @@ function simpletest_script_cleanup($test_id, $test_class, $exitcode) { // simpletest_clean_temporary_directories() cannot be used here, since it // would also delete file directories of other tests that are potentially // running concurrently. - file_unmanaged_delete_recursive($test_directory); + file_unmanaged_delete_recursive($test_directory, array('Drupal\simpletest\TestBase', 'filePreDeleteCallback')); $messages[] = "- Removed test files directory."; }