You are here

public function Twig_Tests_Extension_SandboxTest::testSandboxWithInheritance in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php \Twig_Tests_Extension_SandboxTest::testSandboxWithInheritance()

@expectedException Twig_Sandbox_SecurityError @expectedExceptionMessage Filter "json_encode" is not allowed in "1_child" at line 3.

File

vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php, line 44

Class

Twig_Tests_Extension_SandboxTest

Code

public function testSandboxWithInheritance() {
  $twig = $this
    ->getEnvironment(true, array(), self::$templates, array(
    'block',
  ));
  $twig
    ->loadTemplate('1_child')
    ->render(array());
}