1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-15 05:14:28 +02:00

[ticket/10288] Test to make sure included templates have proper variable scope

PHPBB3-10288
This commit is contained in:
Nathan Guse 2014-03-13 19:48:07 -05:00
parent 052bbf654f
commit a45aa2e5a0
3 changed files with 12 additions and 0 deletions

View File

@ -306,6 +306,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
"nonexistent = 0\n! nonexistent\n\nempty = 0\n! empty\nloop\n\nin loop",
),
array(
'loop_include.html',
array(),
array('test_loop' => array(array('foo' => 'bar'), array('foo' => 'bar1'))),
array(),
"barbarbar1bar1",
),
/* Does not pass with the current implementation.
array(
'loop_reuse.html',

View File

@ -0,0 +1,4 @@
<!-- BEGIN test_loop -->
{test_loop.foo}
<!-- INCLUDE loop_include1.html -->
<!-- END test_loop -->

View File

@ -0,0 +1 @@
{test_loop.foo}