mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/10685] Refactor template test defaults for php 5.4 compatibility.
PHPBB3-10685
This commit is contained in:
parent
d6a6d63a9e
commit
6e5fc53f0d
2 changed files with 13 additions and 5 deletions
|
@ -62,9 +62,12 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
|
|||
$this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
|
||||
}
|
||||
|
||||
protected function setup_engine()
|
||||
protected function setup_engine(array $new_config = array())
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config, $user;
|
||||
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';
|
||||
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue