diff options
Diffstat (limited to 'tests/template/includephp_test.php')
-rw-r--r-- | tests/template/includephp_test.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php index 45dc8dc39e..64240e1be8 100644 --- a/tests/template/includephp_test.php +++ b/tests/template/includephp_test.php @@ -13,7 +13,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case { public function test_includephp_relative() { - $GLOBALS['config']['tpl_allow_php'] = true; + $this->setup_engine(array('tpl_allow_php' => true)); $cache_file = $this->template->cachepath . 'includephp_relative.html.php'; @@ -21,8 +21,6 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case $this->template->set_filenames(array('test' => 'includephp_relative.html')); $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); - - $GLOBALS['config']['tpl_allow_php'] = false; } public function test_includephp_absolute() @@ -36,7 +34,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case fputs($fp, $template_text); fclose($fp); - $GLOBALS['config']['tpl_allow_php'] = true; + $this->setup_engine(array('tpl_allow_php' => true)); $this->template->set_custom_template($cache_dir, 'tests'); $cache_file = $this->template->cachepath . 'includephp_absolute.html.php'; @@ -45,7 +43,5 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case $this->template->set_filenames(array('test' => 'includephp_absolute.html')); $this->assertEquals("Path is absolute.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); - - $GLOBALS['config']['tpl_allow_php'] = false; } } |