mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/13132] Enable twig expressions tests
PHPBB3-13132
This commit is contained in:
parent
cf39cfc593
commit
54753e926d
4 changed files with 27 additions and 10 deletions
|
@ -491,21 +491,27 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||||
array(),
|
array(),
|
||||||
'inner_value',
|
'inner_value',
|
||||||
),
|
),
|
||||||
// Disable: needs Twig 1.14.2
|
array(
|
||||||
/*array(
|
|
||||||
'loop_expressions.html',
|
'loop_expressions.html',
|
||||||
|
array(),
|
||||||
array('loop' => array(array(),array(),array(),array(),array(),array()),),
|
array('loop' => array(array(),array(),array(),array(),array(),array()),),
|
||||||
array(),
|
array(),
|
||||||
array(),
|
'yesnononoyesnoyesnonoyesnono',
|
||||||
'yesnonoyesnonoyesnoyesnonoyes',
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'loop_expressions_twig.html',
|
'loop_expressions_twig.html',
|
||||||
|
array(),
|
||||||
|
array('loop' => array(array(),array(),array(),array(),array(),array()),),
|
||||||
|
array(),
|
||||||
|
'yesnononoyesnoyesnonoyesnono',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'loop_expressions_twig2.html',
|
||||||
array('loop' => array(array(),array(),array(),array(),array(),array()),),
|
array('loop' => array(array(),array(),array(),array(),array(),array()),),
|
||||||
array(),
|
array(),
|
||||||
array(),
|
array(),
|
||||||
'yesnonoyesnonoyesnoyesnonoyes',
|
'yesnononoyesnoyesnonoyesnono',
|
||||||
),*/
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<!-- BEGIN loop -->
|
<!-- 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 -->
|
<!-- END loop -->
|
||||||
|
|
||||||
<!-- BEGIN 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 -->
|
<!-- END loop -->
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{% for loop_inner in loop %}
|
{% 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 %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for loop_inner in loop %}
|
{% 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 %}
|
{% endfor %}
|
||||||
|
|
11
tests/template/templates/loop_expressions_twig2.html
Normal file
11
tests/template/templates/loop_expressions_twig2.html
Normal file
|
@ -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 %}
|
Loading…
Add table
Reference in a new issue