From 424d2f1195b9d062acc98347ecabd42bf9171a7e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 13 Jun 2026 12:40:20 +0200 Subject: [PATCH] Define the macro at the template root in the cache macro fixture --- extra/cache-extra/Tests/Fixtures/macro.test | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/extra/cache-extra/Tests/Fixtures/macro.test b/extra/cache-extra/Tests/Fixtures/macro.test index 4a8afb5cc..efa599881 100644 --- a/extra/cache-extra/Tests/Fixtures/macro.test +++ b/extra/cache-extra/Tests/Fixtures/macro.test @@ -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--