[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:
Oleg Pudeyev 2011-04-25 21:45:10 -04:00
parent f97411b911
commit f0b97cfdcf
2 changed files with 16 additions and 0 deletions

View file

@ -295,6 +295,16 @@ class phpbb_template_template_test extends phpbb_test_case
array(), array(),
"nonexistent = 0\n! nonexistent\n\nempty = 0\n! empty\nloop\n\nin loop", "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",
),
*/
); );
} }

View file

@ -0,0 +1,6 @@
<!-- BEGIN one -->
{one.VAR}
<!-- BEGIN one -->
{one.one.VAR}
<!-- END one -->
<!-- END one -->