added a unit test to demonstrate the need to pass blocks when calling renderBlock...
authorFabien Potencier <fabien.potencier@gmail.com>
Sat, 7 Apr 2012 20:40:59 +0000 (22:40 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Sat, 7 Apr 2012 20:40:59 +0000 (22:40 +0200)
test/Twig/Tests/Fixtures/functions/block.test [new file with mode: 0644]

diff --git a/test/Twig/Tests/Fixtures/functions/block.test b/test/Twig/Tests/Fixtures/functions/block.test
new file mode 100644 (file)
index 0000000..8e54059
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+"block" function
+--TEMPLATE--
+{% extends 'base.twig' %}
+{% block bar %}BAR{% endblock %}
+--TEMPLATE(base.twig)--
+{% block foo %}{{ block('bar') }}{% endblock %}
+{% block bar %}BAR_BASE{% endblock %}
+--DATA--
+return array()
+--EXPECT--
+BARBAR