aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/templates/loop_size_twig.html
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-10-07 20:51:08 +0200
committerNicofuma <github@nicofuma.fr>2015-03-05 21:38:59 +0100
commitcf39cfc5939f9407082f8f5c1f876ea0ee607a45 (patch)
tree06e9c0406bded428501015eb10b43718f0d0db1a /tests/template/templates/loop_size_twig.html
parent70990bc86ff66238ae2e9ccbc03bcf1afd49da07 (diff)
downloadforums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar
forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.gz
forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.bz2
forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.xz
forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.zip
[ticket/13132] Twig: Add loops content to the root context
PHPBB3-13132
Diffstat (limited to 'tests/template/templates/loop_size_twig.html')
-rw-r--r--tests/template/templates/loop_size_twig.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/template/templates/loop_size_twig.html b/tests/template/templates/loop_size_twig.html
new file mode 100644
index 0000000000..f6d2571e11
--- /dev/null
+++ b/tests/template/templates/loop_size_twig.html
@@ -0,0 +1,39 @@
+{% if nonexistent_loop|length %}
+nonexistent
+{% endif %}
+
+{% if nonexistent_loop|length == 0 %}
+nonexistent = 0
+{% endif %}
+
+{% if ! nonexistent_loop|length %}
+! nonexistent
+{% endif %}
+
+{% if empty_loop|length %}
+empty
+{% endif %}
+
+{% if empty_loop|length == 0 %}
+empty = 0
+{% endif %}
+
+{% if ! empty_loop|length %}
+! empty
+{% endif %}
+
+{% if test_loop|length %}
+loop
+{% endif %}
+
+{% if test_loop|length == 0 %}
+loop = 0
+{% endif %}
+
+{% if ! test_loop|length %}
+! loop
+{% endif %}
+
+{% for test_loop_inner in test_loop %}
+in loop
+{% endfor %}