aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/template_test_case.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-03-06 19:28:46 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-03-06 19:34:20 -0500
commit6e5fc53f0d1e456ea1047f061287488504b98f65 (patch)
tree3faa8d3b0acf6ea3656c3b6c35bbcb86c443a50e /tests/template/template_test_case.php
parentd6a6d63a9eee208fdfafed1441f19076a8f6d2e1 (diff)
downloadforums-6e5fc53f0d1e456ea1047f061287488504b98f65.tar
forums-6e5fc53f0d1e456ea1047f061287488504b98f65.tar.gz
forums-6e5fc53f0d1e456ea1047f061287488504b98f65.tar.bz2
forums-6e5fc53f0d1e456ea1047f061287488504b98f65.tar.xz
forums-6e5fc53f0d1e456ea1047f061287488504b98f65.zip
[ticket/10685] Refactor template test defaults for php 5.4 compatibility.
PHPBB3-10685
Diffstat (limited to 'tests/template/template_test_case.php')
-rw-r--r--tests/template/template_test_case.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index a78837516b..5b60785fee 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -46,15 +46,20 @@ class phpbb_template_template_test_case extends phpbb_test_case
return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
}
- protected function setup_engine(array $new_config = array())
+ protected function config_defaults()
{
- global $phpbb_root_path, $phpEx, $user;
-
$defaults = array(
'load_tplcompile' => true,
'tpl_allow_php' => false,
);
+ return $defaults;
+ }
+
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx, $user;
+ $defaults = $this->config_defaults();
$config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';