From 7ab6dbc16bee00dafbba5f6ea2f44bed93c8e2c0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 25 May 2010 17:58:14 +0200 Subject: [PATCH] disabled the cache when testing the sandbox --- test/Twig/Tests/Extension/SandboxTest.php | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/test/Twig/Tests/Extension/SandboxTest.php b/test/Twig/Tests/Extension/SandboxTest.php index 21785b7..28e5591 100644 --- a/test/Twig/Tests/Extension/SandboxTest.php +++ b/test/Twig/Tests/Extension/SandboxTest.php @@ -92,7 +92,6 @@ class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase '3_included' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}', ); - $twig = $this->getEnvironment(false, self::$templates); $twig = $this->getEnvironment(true, self::$templates); try { $twig->loadTemplate('3_basic')->render(self::$params); @@ -104,7 +103,7 @@ class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase protected function getEnvironment($sandboxed, $templates, $tags = array(), $filters = array(), $methods = array(), $properties = array()) { $loader = new Twig_Loader_Array($templates); - $twig = new Twig_Environment($loader, array('trim_blocks' => true, 'debug' => true)); + $twig = new Twig_Environment($loader, array('trim_blocks' => true, 'debug' => true, 'cache' => false)); $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties); $twig->addExtension(new Twig_Extension_Sandbox($policy, $sandboxed)); -- 1.7.2.5