projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Yaffs site version 1.1
[yaffs-website]
/
vendor
/
twig
/
twig
/
test
/
Twig
/
Tests
/
Fixtures
/
tags
/
inheritance
/
block_expr.test
1
--TEST--
2
block_expr
3
--TEMPLATE--
4
{% extends "base.twig" %}
5
6
{% block element -%}
7
Element:
8
{{- parent() -}}
9
{% endblock %}
10
--TEMPLATE(base.twig)--
11
{% spaceless %}
12
{% block element -%}
13
<div>
14
{%- if item.children is defined %}
15
{%- for item in item.children %}
16
{{- block('element') -}}
17
{% endfor %}
18
{%- endif -%}
19
</div>
20
{%- endblock %}
21
{% endspaceless %}
22
--DATA--
23
return array(
24
'item' => array(
25
'children' => array(
26
null,
27
null,
28
)
29
)
30
)
31
--EXPECT--
32
Element:<div>Element:<div></div>Element:<div></div></div>