diff --git a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php index 0bc52d0..3888819 100644 --- a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php +++ b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php @@ -47,13 +47,13 @@ public function testInlineTemplate() { $this->assertEqual($renderer->renderRoot($element), 'test-with-context '); // Enable twig_auto_reload and twig_debug. - $settings = Settings::getAll(); - $settings['twig_debug'] = TRUE; - $settings['twig_auto_reload'] = TRUE; + $twig_config = $this->container->getParameter('twig.config'); + $twig_config['debug'] = TRUE; + $twig_config['auto_reload'] = TRUE; + $this->container->setParameter('twig.config', $twig_config); - new Settings($settings); - $this->container = $this->kernel->rebuildContainer(); - \Drupal::setContainer($this->container); + // Reset the Twig environment to use the new environment parameters. + $this->container->set('twig', NULL); $element = array(); $element['test'] = array(