From 490913c10393a0e48367b7500daa6c9d3e044fbe Mon Sep 17 00:00:00 2001 From: fabien Date: Tue, 22 Dec 2009 06:47:45 +0000 Subject: [PATCH] added a unit test to prove that blocks are escaped git-svn-id: http://svn.twig-project.org/trunk@193 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- test/fixtures/tags/autoescape/blocks.test | 12 ++++++++++++ test/unit/integrationTest.php | 2 +- 2 files changed, 13 insertions(+), 1 deletions(-) create mode 100644 test/fixtures/tags/autoescape/blocks.test diff --git a/test/fixtures/tags/autoescape/blocks.test b/test/fixtures/tags/autoescape/blocks.test new file mode 100644 index 0000000..8e05761 --- /dev/null +++ b/test/fixtures/tags/autoescape/blocks.test @@ -0,0 +1,12 @@ +--TEST-- +"autoescape" tag applies escaping on embedded blocks +--TEMPLATE-- +{% autoescape on %} + {% block foo %} + {{ var }} + {% endblock %} +{% endautoescape %} +--DATA-- +return array('var' => '
') +--EXPECT-- +<br /> diff --git a/test/unit/integrationTest.php b/test/unit/integrationTest.php index a347c43..9e3f2a3 100644 --- a/test/unit/integrationTest.php +++ b/test/unit/integrationTest.php @@ -51,7 +51,7 @@ class TestExtension extends Twig_Extension } } -$t = new LimeTest(59); +$t = new LimeTest(60); $fixturesDir = realpath(dirname(__FILE__).'/../fixtures/'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) -- 1.7.2.5