Files
Twig/tests/Fixtures/macros/call_without_parentheses.test
2026-07-28 16:39:05 +02:00

11 lines
337 B
Plaintext

--TEST--
Calling a macro without parentheses is forbidden
--TEMPLATE--
{% import _self as macros %}
{{ macros.hello }}
{% macro hello() %}Hello{% endmacro %}
--DATA--
return []
--EXCEPTION--
Twig\Error\SyntaxError: Omitting parentheses when calling a macro is not allowed; add parentheses after the macro name in "index.twig" at line 3.