Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed embed parent token for simple use cases
- Loading branch information
Showing
4 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
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
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
35 changes: 35 additions & 0 deletions
35
test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.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,35 @@ | ||
--TEST-- | ||
"embed" tag | ||
--TEMPLATE-- | ||
FOO | ||
{% embed foo ~ ".twig" %} | ||
{% block c1 %} | ||
{{ parent() }} | ||
block1extended | ||
{% endblock %} | ||
{% endembed %} | ||
|
||
BAR | ||
--TEMPLATE(foo.twig)-- | ||
A | ||
{% block c1 %} | ||
block1 | ||
{% endblock %} | ||
B | ||
{% block c2 %} | ||
block2 | ||
{% endblock %} | ||
C | ||
--DATA-- | ||
return array('foo' => 'foo') | ||
--EXPECT-- | ||
FOO | ||
|
||
A | ||
block1 | ||
|
||
block1extended | ||
B | ||
block2 | ||
C | ||
BAR |
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,35 @@ | ||
--TEST-- | ||
"embed" tag | ||
--TEMPLATE-- | ||
FOO | ||
{% embed foo %} | ||
{% block c1 %} | ||
{{ parent() }} | ||
block1extended | ||
{% endblock %} | ||
{% endembed %} | ||
|
||
BAR | ||
--TEMPLATE(foo.twig)-- | ||
A | ||
{% block c1 %} | ||
block1 | ||
{% endblock %} | ||
B | ||
{% block c2 %} | ||
block2 | ||
{% endblock %} | ||
C | ||
--DATA-- | ||
return array('foo' => 'foo.twig') | ||
--EXPECT-- | ||
FOO | ||
|
||
A | ||
block1 | ||
|
||
block1extended | ||
B | ||
block2 | ||
C | ||
BAR |