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:
parent
052bbf654f
commit
a45aa2e5a0
@ -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',
|
||||
|
4
tests/template/templates/loop_include.html
Normal file
4
tests/template/templates/loop_include.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!-- BEGIN test_loop -->
|
||||
{test_loop.foo}
|
||||
<!-- INCLUDE loop_include1.html -->
|
||||
<!-- END test_loop -->
|
1
tests/template/templates/loop_include1.html
Normal file
1
tests/template/templates/loop_include1.html
Normal file
@ -0,0 +1 @@
|
||||
{test_loop.foo}
|
Loading…
x
Reference in New Issue
Block a user