aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/template_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-01-14 01:14:29 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-01-14 01:14:29 +0100
commit4c50a35b62a46de69b439f9ac8007721d76881b0 (patch)
tree99186871a885732403039c0fc6241b1ffdf0a37f /tests/template/template_test.php
parent3c542b852a99f62337c8cf1c6d3e6551c4e3dca1 (diff)
downloadforums-4c50a35b62a46de69b439f9ac8007721d76881b0.tar
forums-4c50a35b62a46de69b439f9ac8007721d76881b0.tar.gz
forums-4c50a35b62a46de69b439f9ac8007721d76881b0.tar.bz2
forums-4c50a35b62a46de69b439f9ac8007721d76881b0.tar.xz
forums-4c50a35b62a46de69b439f9ac8007721d76881b0.zip
[ticket/11323] Add tests for inclusion of defined variables
This adds 2 tests for the template engine. The test using include_define_variable.html will test if a defined variable, which was defined with another template variable, can be used to include a file. The second test will do the same inside a loop using a loop variable. PHPBB3-11323
Diffstat (limited to 'tests/template/template_test.php')
-rw-r--r--tests/template/template_test.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 9b3c6ac245..291b424bdd 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -238,7 +238,22 @@ class phpbb_template_template_test extends phpbb_test_case
array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())),
array('loop'),
'',
- ),/* no top level nested loops
+ ),
+ array(
+ 'include_define_variable.html',
+ array('VARIABLE' => 'variable.html'),
+ array(),
+ array(),
+ 'variable.html',
+ ),
+ array(
+ 'include_loop_define.html',
+ array('VARIABLE' => 'value'),
+ array('loop' => array(array('NESTED_FILE' => 'variable.html'))),
+ array(),
+ 'value',
+ ),
+ /* no top level nested loops
array(
'loop_vars.html',
array(),