mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 08:26:46 +00:00
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