diff -u b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php --- b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @@ -42,6 +42,13 @@ protected $configDirectories = []; /** + * The original container. + * + * @var \Symfony\Component\DependencyInjection\ContainerInterface + */ + protected $originalContainer; + + /** * Prepares site settings and services before installation. */ protected function prepareSettings() { @@ -603,6 +610,9 @@ drupal_static_reset(); // Ensure there is no service container. + if (empty($this->originalContainer)) { + $this->originalContainer = $this->initKernel(\Drupal::request()); + } $this->container = NULL; \Drupal::unsetContainer(); @@ -641,2 +651,17 @@ + /** + * Returns all supported database driver installer objects. + * + * This wraps drupal_get_database_types() for use without a current container. + * + * @return \Drupal\Core\Database\Install\Tasks[] + * An array of available database driver installer objects. + */ + protected function getDatabaseTypes() { + \Drupal::setContainer($this->originalContainer); + $database_types = drupal_get_database_types(); + \Drupal::unsetContainer(); + return $database_types; + } + } diff -u b/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php --- b/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -417,21 +417,6 @@ } /** - * Returns all supported database driver installer objects. - * - * This wraps drupal_get_database_types() for use without a current container. - * - * @return \Drupal\Core\Database\Install\Tasks[] - * An array of available database driver installer objects. - */ - protected function getDatabaseTypes() { - \Drupal::setContainer($this->originalContainer); - $database_types = drupal_get_database_types(); - \Drupal::unsetContainer(); - return $database_types; - } - - /** * Queues custom translations to be written to settings.php. * * Use WebTestBase::writeCustomTranslations() to apply and write the queued reverted: --- b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -2314,7 +2314,6 @@ $this->display['cache_metadata']['tags'] = $cache_metadata->getCacheTags(); } else { - $a = 123; $cache_metadata = (new CacheableMetadata()) ->setCacheMaxAge($this->display['cache_metadata']['max-age']) ->setCacheContexts($this->display['cache_metadata']['contexts']) diff -u b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php --- b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @@ -332,6 +332,7 @@ $this->doSelectionTest(); // Run the update hooks. $this->clickLink(t('Apply pending updates')); + $this->checkForMetaRefresh(); // Ensure there are no failed updates. if ($this->checkFailedUpdates) { diff -u b/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php --- b/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -28,7 +28,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Symfony\Component\CssSelector\CssSelectorConverter; -use Symfony\Component\HttpFoundation\Request; /** * Provides a test case for functional Drupal tests. @@ -1090,11 +1089,8 @@ * text. Defaults to 0. */ protected function clickLink($label, $index = 0) { - static $i; $label = (string) $label; $links = $this->getSession()->getPage()->findAll('named', ['link', $label]); - $i++; - file_put_contents("/tmp/debug-$i.html", $this->getSession()->getPage()->getHtml()); $links[$index]->click(); }