From: Fabien Potencier Date: Sat, 21 Jan 2012 20:40:17 +0000 (+0100) Subject: added some unit tests for macros X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f2195cfe3f2206310580981c93805794df6040bc;p=web%2Fkonrad%2Ftwig.git added some unit tests for macros --- 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