mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[feature/template-engine] Added a test for reuse of loop identifiers.
This currently does not pass, thus it is commented out. The reuse appears implausible in the same file, however it may be also done across template files where it is much harder to detect. PHPBB3-9726
This commit is contained in:
parent
f97411b911
commit
f0b97cfdcf
2 changed files with 16 additions and 0 deletions
|
@ -295,6 +295,16 @@ class phpbb_template_template_test extends phpbb_test_case
|
|||
array(),
|
||||
"nonexistent = 0\n! nonexistent\n\nempty = 0\n! empty\nloop\n\nin loop",
|
||||
),
|
||||
/* Does not pass with the current implementation.
|
||||
array(
|
||||
'loop_reuse.html',
|
||||
array(),
|
||||
array('one' => array(array('VAR' => 'a'), array('VAR' => 'b')), 'one.one' => array(array('VAR' => 'c'), array('VAR' => 'd'))),
|
||||
array(),
|
||||
// Not entirely sure what should be outputted but the current output of "a" is most certainly wrong
|
||||
"a\nb\nc\nd",
|
||||
),
|
||||
*/
|
||||
);
|
||||
}
|
||||
|
||||
|
|
6
tests/template/templates/loop_reuse.html
Normal file
6
tests/template/templates/loop_reuse.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!-- BEGIN one -->
|
||||
{one.VAR}
|
||||
<!-- BEGIN one -->
|
||||
{one.one.VAR}
|
||||
<!-- END one -->
|
||||
<!-- END one -->
|
Loading…
Add table
Reference in a new issue