Define the macro at the template root in the cache macro fixture

This commit is contained in:
Fabien Potencier
2026-06-13 12:40:20 +02:00
parent 7f9714a13e
commit 424d2f1195
+4 -5
View File
@@ -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--