aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/templates
diff options
context:
space:
mode:
authorNicofuma <github@nicofuma.fr>2015-03-05 21:53:48 +0100
committerNicofuma <github@nicofuma.fr>2015-03-05 21:53:48 +0100
commit54753e926df28b686937394bc675130647893639 (patch)
tree9c479c53286bfaa16c7fcefc32721f22e03c6e7e /tests/template/templates
parentcf39cfc5939f9407082f8f5c1f876ea0ee607a45 (diff)
downloadforums-54753e926df28b686937394bc675130647893639.tar
forums-54753e926df28b686937394bc675130647893639.tar.gz
forums-54753e926df28b686937394bc675130647893639.tar.bz2
forums-54753e926df28b686937394bc675130647893639.tar.xz
forums-54753e926df28b686937394bc675130647893639.zip
[ticket/13132] Enable twig expressions tests
PHPBB3-13132
Diffstat (limited to 'tests/template/templates')
-rw-r--r--tests/template/templates/loop_expressions.html4
-rw-r--r--tests/template/templates/loop_expressions_twig.html4
-rw-r--r--tests/template/templates/loop_expressions_twig2.html11
3 files changed, 15 insertions, 4 deletions
diff --git a/tests/template/templates/loop_expressions.html b/tests/template/templates/loop_expressions.html
index 278bce1eca..ddb9fd52fa 100644
--- a/tests/template/templates/loop_expressions.html
+++ b/tests/template/templates/loop_expressions.html
@@ -1,11 +1,11 @@
<!-- BEGIN loop -->
-<!-- IF loop.S_ROW_NUM is divisible by 4 -->on<!-- ELSE -->off<!-- ENDIF -->
+<!-- IF loop.S_ROW_NUM is divisible by(4) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- END loop -->
<!-- BEGIN loop -->
-<!-- IF loop.S_ROW_NUM is divisible by 3 -->on<!-- ELSE -->off<!-- ENDIF -->
+<!-- IF loop.S_ROW_NUM is divisible by(3) -->yes<!-- ELSE -->no<!-- ENDIF -->
<!-- END loop -->
diff --git a/tests/template/templates/loop_expressions_twig.html b/tests/template/templates/loop_expressions_twig.html
index 61a36c51e4..5ca8cc3601 100644
--- a/tests/template/templates/loop_expressions_twig.html
+++ b/tests/template/templates/loop_expressions_twig.html
@@ -1,11 +1,11 @@
{% for loop_inner in loop %}
-{% if loop_inner.S_ROW_NUM is divisible by 4 %}on{% else %}off{% endif %}
+{% if loop_inner.S_ROW_NUM is divisible by(4) %}yes{% else %}no{% endif %}
{% endfor %}
{% for loop_inner in loop %}
-{% if loop_inner.S_ROW_NUM is divisible by 3 %}on{% else %}off{% endif %}
+{% if loop_inner.S_ROW_NUM is divisible by(3) %}yes{% else %}no{% endif %}
{% endfor %}
diff --git a/tests/template/templates/loop_expressions_twig2.html b/tests/template/templates/loop_expressions_twig2.html
new file mode 100644
index 0000000000..16159ead4c
--- /dev/null
+++ b/tests/template/templates/loop_expressions_twig2.html
@@ -0,0 +1,11 @@
+{% for loop_inner in loop %}
+
+{% if loop.index0 is divisible by(4) %}yes{% else %}no{% endif %}
+
+{% endfor %}
+
+{% for loop_inner in loop %}
+
+{% if loop.index0 is divisible by(3) %}yes{% else %}no{% endif %}
+
+{% endfor %}