/**
* Ensures Twig template auto reload setting can be overridden.
*/
public function testTwigAutoReloadOverride() { // Enable auto reload and rebuild the service container.
$parameters =
$this->container->
getParameter('twig.config'
);
$parameters['auto_reload'
] = TRUE;
$this->
setContainerParameter('twig.config',
$parameters);
$this->
rebuildContainer();
// Check isAutoReload() via the Twig service container.
$this->
assertTrue($this->container->
get('twig'
)->
isAutoReload(), 'Automatic reloading of Twig templates enabled.'
);
// Disable auto reload and check the service container again.
$parameters =
$this->container->
getParameter('twig.config'
);
$parameters['auto_reload'
] = FALSE;
$this->
setContainerParameter('twig.config',
$parameters);
$this->
rebuildContainer();
$this->
assertFalse($this->container->
get('twig'
)->
isAutoReload(), 'Automatic reloading of Twig templates disabled.'
);
} /**
* Ensures Twig engine debug setting can be overridden.
*/