Files
Twig/tests/Fixtures/macros/dynamic_name_non_string.test
2026-07-30 13:53:24 +02:00

10 lines
285 B
Plaintext

--TEST--
macro called with a dynamic name coerces the name before lookup
--TEMPLATE--
{% import _self as macros %}
{{ macros.(name)() }}
--DATA--
return ['name' => null]
--EXCEPTION--
Twig\Error\RuntimeError: Macro "" is not defined in template "index.twig" in "index.twig" at line 3.