only in patch2: unchanged: --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -719,11 +719,12 @@ abstract class WebTestBase extends TestBase { $this->assertTrue($success, t('Enabled modules: %modules', array('%modules' => implode(', ', $modules)))); } - // Create a new DrupalKernel for testing purposes, now that all required - // modules have been enabled. This also stores a new dependency injection - // container in drupal_container(). Drupal\simpletest\TestBase::tearDown() - // restores the original container. + // Now that all required modules are enabled, reset drupal_container() and + // create a new DrupalKernel for testing purposes, which when booted, will + // store a new dependency injection container in drupal_container(). + // Drupal\simpletest\TestBase::tearDown() restores the original container. // @see Drupal\Core\DrupalKernel::initializeContainer() + drupal_container(NULL, TRUE); $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