Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 24, 2024
1 parent efc527e commit 85c2ba5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions tests/Fixtures/tags/inheritance/extends_with_nested_blocks.test
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 85c2ba5

Please sign in to comment.