From f2195cfe3f2206310580981c93805794df6040bc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 21 Jan 2012 21:40:17 +0100 Subject: [PATCH] added some unit tests for macros --- test/Twig/Tests/Fixtures/macros/simple.test | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 test/Twig/Tests/Fixtures/macros/simple.test diff --git a/test/Twig/Tests/Fixtures/macros/simple.test b/test/Twig/Tests/Fixtures/macros/simple.test new file mode 100644 index 0000000..f5bc1f6 --- /dev/null +++ b/test/Twig/Tests/Fixtures/macros/simple.test @@ -0,0 +1,17 @@ +--TEST-- +macro +--TEMPLATE-- +{% import _self as test %} +{% from _self import test %} + +{% macro test() -%} + foo
+{%- endmacro %} + +{{ test.test() }} +{{ test() }} +--DATA-- +return array(); +--EXPECT-- +foo
+foo
-- 1.7.2.5