Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 9, 2024
1 parent bf6b7ae commit 45e167a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/Fixtures/tags/inheritance/conditional_block_nested.test
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 45e167a

Please # to comment.