diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-04 10:40:14 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-04 10:40:14 -0500 |
commit | 81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c (patch) | |
tree | d2acaf41a4fcffcd8c839fa8f1f804099b3c2f01 /tests/template | |
parent | 84e0943c7bee5061bc53aed2a14f82751d238bf8 (diff) | |
download | forums-81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c.tar forums-81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c.tar.gz forums-81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c.tar.bz2 forums-81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c.tar.xz forums-81f27fd87ee2e8ffc1ad1ad06c5b255c5436e86c.zip |
[feature/twig] Add test to make sure nested loops get the correct S_ROW_COUNT
PHPBB3-11598
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/template_test.php | 7 | ||||
-rw-r--r-- | tests/template/templates/loop_nested2.html | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 1b3dda9b2a..4970ce0363 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -126,6 +126,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case "101234561\nx\n101234561\nx\n101234561\nx\n1234561\nx\n1\nx\n101\nx\n234\nx\n10\nx\n561\nx\n561", ), array( + 'loop_nested2.html', + array(), + array('outer' => array(array(), array()), 'outer.middle' => array(array(), array())), + array(), + "o0o1m01m11", + ), + array( 'define.html', array(), array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())), diff --git a/tests/template/templates/loop_nested2.html b/tests/template/templates/loop_nested2.html new file mode 100644 index 0000000000..3eeeb5e36a --- /dev/null +++ b/tests/template/templates/loop_nested2.html @@ -0,0 +1,6 @@ +<!-- BEGIN outer --> +o{outer.S_ROW_COUNT} +<!-- BEGIN middle --> +m{outer.middle.S_ROW_COUNT}{outer.S_ROW_COUNT} +<!-- END middle --> +<!-- END outer --> |