diff --git a/tests/Fixtures/tags/inheritance/extends_as_array_with_nested_blocks.test b/tests/Fixtures/tags/inheritance/extends_as_array_with_nested_blocks.test new file mode 100644 index 00000000000..01d23fce2c2 --- /dev/null +++ b/tests/Fixtures/tags/inheritance/extends_as_array_with_nested_blocks.test @@ -0,0 +1,31 @@ +--TEST-- +"extends" tag +--TEMPLATE-- +{% extends ["parent.twig"] %} + +{% block outer %} + outer wrap start + {{~ parent() }} + outer wrap end +{% endblock %} + +{% block inner -%} + inner actual +{% endblock %} +--TEMPLATE(parent.twig)-- +{% block outer %} + outer start + {% block inner %} + inner default + {% endblock %} + outer end +{% endblock %} +--DATA-- +return [] +--EXPECT-- + outer wrap start + outer start + inner actual + outer end + + outer wrap end diff --git a/tests/Fixtures/tags/inheritance/extends_with_nested_blocks.test b/tests/Fixtures/tags/inheritance/extends_with_nested_blocks.test new file mode 100644 index 00000000000..496f278cf38 --- /dev/null +++ b/tests/Fixtures/tags/inheritance/extends_with_nested_blocks.test @@ -0,0 +1,31 @@ +--TEST-- +"extends" tag +--TEMPLATE-- +{% extends "parent.twig" %} + +{% block outer %} + outer wrap start + {{~ parent() }} + outer wrap end +{% endblock %} + +{% block inner -%} + inner actual +{% endblock %} +--TEMPLATE(parent.twig)-- +{% block outer %} + outer start + {% block inner %} + inner default + {% endblock %} + outer end +{% endblock %} +--DATA-- +return [] +--EXPECT-- + outer wrap start + outer start + inner actual + outer end + + outer wrap end