added a unit test to prove that blocks are escaped
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Tue, 22 Dec 2009 06:47:45 +0000 (06:47 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Tue, 22 Dec 2009 06:47:45 +0000 (06:47 +0000)
git-svn-id: http://svn.twig-project.org/trunk@193 93ef8e89-cb99-4229-a87c-7fa0fa45744b

test/fixtures/tags/autoescape/blocks.test [new file with mode: 0644]
test/unit/integrationTest.php

diff --git a/test/fixtures/tags/autoescape/blocks.test b/test/fixtures/tags/autoescape/blocks.test
new file mode 100644 (file)
index 0000000..8e05761
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+"autoescape" tag applies escaping on embedded blocks
+--TEMPLATE--
+{% autoescape on %}
+  {% block foo %}
+    {{ var }}
+  {% endblock %}
+{% endautoescape %}
+--DATA--
+return array('var' => '<br />')
+--EXPECT--
+&lt;br /&gt;
index a347c43..9e3f2a3 100644 (file)
@@ -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)