From b5a79009cebe926058b745621158a105a45648a1 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Fri, 16 Sep 2011 01:46:42 -0500 Subject: [ticket/10322] Separate template varref resolution from output generation Most template variables can now have their PHP variable name resolved instead of only compiling directly. This allows for the use of block vars in INCLUDE statements. This does not work for language variables since they require multiple checks. Added tests for the new types of allowed INCLUDEs. PHPBB3-10322 --- tests/template/template_test.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/template/template_test.php') diff --git a/tests/template/template_test.php b/tests/template/template_test.php index a200148a29..28eba05217 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -162,12 +162,26 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array(), 'value', ), + array( + 'include_define.html', + array('VARIABLE' => 'value'), + array(), + array(), + 'value', + ), + array( + 'include_loop.html', + array(), + array('loop' => array(array('NESTED_FILE' => 'include_loop1.html')), 'loop.inner' => array(array('NESTED_FILE' => 'include_loop1.html'), array('NESTED_FILE' => 'include_loop2.html'), array('NESTED_FILE' => 'include_loop3.html'))), + array(), + "1\n_1\n_02\n_3", + ), array( 'include_variable.html', array('FILE' => 'variable.html', 'VARIABLE' => 'value'), array(), array(), - "value\nvalue", + 'value', ), array( 'loop_vars.html', -- cgit v1.2.1