mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-02 18:07:35 +00:00
Expose the escaping strategy a template was compiled with
This commit is contained in:
@@ -43,6 +43,13 @@ class TemplateWrapperTest extends TestCase
|
||||
$wrapper->unwrap(new Environment(new ArrayLoader()));
|
||||
}
|
||||
|
||||
public function testGetDefaultEscapeStrategy(): void
|
||||
{
|
||||
$twig = new Environment(new ArrayLoader(['index.js.twig' => 'content']), ['autoescape' => 'name']);
|
||||
|
||||
$this->assertSame('js', $twig->load('index.js.twig')->getDefaultEscapeStrategy());
|
||||
}
|
||||
|
||||
public function testHasGetBlocks(): void
|
||||
{
|
||||
$twig = new Environment(new ArrayLoader([
|
||||
|
||||
Reference in New Issue
Block a user