You are here

public function TwigSettingsTest::testTwigInlineWithAutoReload in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Theme/TwigSettingsTest.php \Drupal\system\Tests\Theme\TwigSettingsTest::testTwigInlineWithAutoReload()

Tests twig inline templates with auto_reload.

File

core/modules/system/src/Tests/Theme/TwigSettingsTest.php, line 123
Contains \Drupal\system\Tests\Theme\TwigSettingsTest.

Class

TwigSettingsTest
Tests overriding Twig engine settings via settings.php.

Namespace

Drupal\system\Tests\Theme

Code

public function testTwigInlineWithAutoReload() {
  $parameters = $this->container
    ->getParameter('twig.config');
  $parameters['auto_reload'] = TRUE;
  $parameters['debug'] = TRUE;
  $this
    ->setContainerParameter('twig.config', $parameters);
  $this
    ->rebuildContainer();
  $this
    ->drupalGet('theme-test/inline-template-test');
  $this
    ->assertResponse(200);
  $this
    ->drupalGet('theme-test/inline-template-test');
  $this
    ->assertResponse(200);
}