Skip to content

Commit 45e167a

Browse files
committed
Add more tests
1 parent bf6b7ae commit 45e167a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--TEST--
2+
conditional "block" tag with "extends" tag (nested)
3+
--TEMPLATE--
4+
{% extends "layout.twig" %}
5+
6+
{% block content_base %}
7+
{{ parent() -}}
8+
index
9+
{% endblock %}
10+
11+
{% block content_layout -%}
12+
{{ parent() -}}
13+
nested_index
14+
{% endblock %}
15+
--TEMPLATE(layout.twig)--
16+
{% extends "base.twig" %}
17+
18+
{% block content_base %}
19+
{{ parent() -}}
20+
layout
21+
{% if true -%}
22+
{% block content_layout -%}
23+
nested_layout
24+
{% endblock -%}
25+
{% endif %}
26+
{% endblock %}
27+
--TEMPLATE(base.twig)--
28+
{% block content_base %}
29+
base
30+
{% endblock %}
31+
--DATA--
32+
return []
33+
--EXPECT--
34+
base
35+
layout
36+
nested_layout
37+
nested_index
38+
index

0 commit comments

Comments
 (0)