diff options
Diffstat (limited to 'tests/template/includephp_test.php')
-rw-r--r-- | tests/template/includephp_test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php index f008a734eb..c93a53e2ad 100644 --- a/tests/template/includephp_test.php +++ b/tests/template/includephp_test.php @@ -23,6 +23,18 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); } + public function test_includephp_variables() + { + $this->setup_engine(array('tpl_allow_php' => true)); + + $cache_file = $this->template->cachepath . 'includephp_variables.html.php'; + + $this->run_template('includephp_variables.html', array('TEMPLATES' => 'templates'), array(), array(), "Path includes variables.\ntesting included php", $cache_file); + + $this->template->set_filenames(array('test' => 'includephp_variables.html')); + $this->assertEquals("Path includes variables.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); + } + public function test_includephp_absolute() { $path_to_php = dirname(__FILE__) . '/templates/_dummy_include.php.inc'; |