From c6bf195e217b8498f45a14f2aa775aea6b7623a5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 7 Apr 2012 22:40:59 +0200 Subject: [PATCH] added a unit test to demonstrate the need to pass blocks when calling renderBlock|displayBlock --- test/Twig/Tests/Fixtures/functions/block.test | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 test/Twig/Tests/Fixtures/functions/block.test diff --git a/test/Twig/Tests/Fixtures/functions/block.test b/test/Twig/Tests/Fixtures/functions/block.test new file mode 100644 index 0000000..8e54059 --- /dev/null +++ b/test/Twig/Tests/Fixtures/functions/block.test @@ -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 -- 1.7.2.5