mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 03:16:34 +00:00
minor #4843 Define macros at the template root in the cache macro fixture (fabpot)
This PR was merged into the 3.x branch.
Discussion
----------
Define macros at the template root in the cache macro fixture
Commits
-------
424d2f1195 Define the macro at the template root in the cache macro fixture
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
--TEST--
|
||||
macro call inside "cache" tag
|
||||
--TEMPLATE--
|
||||
{% macro macro_out(bar) %}{{ bar }}{% endmacro %}
|
||||
{% macro out(bar) %}{{ bar }}{% endmacro %}
|
||||
1
|
||||
{% cache "testmacro1" ttl(3) %}
|
||||
{%~ macro macro_in(bar) %}{{ bar }}{% endmacro %}
|
||||
2
|
||||
{{ _self.macro_out(3) }}
|
||||
{{ _self.macro_in(4) }}
|
||||
{{ _self.out(3) }}
|
||||
{{ _self.out(4) }}
|
||||
{% endcache %}
|
||||
5
|
||||
{{ _self.macro_in(6) }}
|
||||
{{ _self.out(6) }}
|
||||
--DATA--
|
||||
return []
|
||||
--EXPECT--
|
||||
|
||||
Reference in New Issue
Block a user