-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was merged into the 3.x branch. Discussion ---------- Add some tests Closes #3691 The bug described in #3691 has been fixed via #3999. This PR adds tests to prove it works now and to avoid future regressions. Commits ------- 85c2ba5 Add some tests
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
tests/Fixtures/tags/inheritance/extends_as_array_with_nested_blocks.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
tests/Fixtures/tags/inheritance/extends_with_nested_blocks.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |