diff --git a/tests/Fixtures/tags/inheritance/conditional_block_nested.test b/tests/Fixtures/tags/inheritance/conditional_block_nested.test new file mode 100644 index 00000000000..1f99dfb6167 --- /dev/null +++ b/tests/Fixtures/tags/inheritance/conditional_block_nested.test @@ -0,0 +1,38 @@ +--TEST-- +conditional "block" tag with "extends" tag (nested) +--TEMPLATE-- +{% extends "layout.twig" %} + +{% block content_base %} + {{ parent() -}} + index +{% endblock %} + +{% block content_layout -%} + {{ parent() -}} + nested_index +{% endblock %} +--TEMPLATE(layout.twig)-- +{% extends "base.twig" %} + +{% block content_base %} + {{ parent() -}} + layout + {% if true -%} + {% block content_layout -%} + nested_layout + {% endblock -%} + {% endif %} +{% endblock %} +--TEMPLATE(base.twig)-- +{% block content_base %} + base +{% endblock %} +--DATA-- +return [] +--EXPECT-- +base +layout + nested_layout + nested_index +index