mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-11 18:15:20 +02:00
Merge remote-tracking branch 'p/ticket/10685' into develop
* p/ticket/10685: [ticket/10685] Refactor template test defaults for php 5.4 compatibility.
This commit is contained in:
commit
0eb7f18c98
@ -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);
|
$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->template_path = dirname(__FILE__) . '/templates';
|
||||||
$this->parent_template_path = dirname(__FILE__) . '/parent_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)))));
|
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(
|
$defaults = array(
|
||||||
'load_tplcompile' => true,
|
'load_tplcompile' => true,
|
||||||
'tpl_allow_php' => false,
|
'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));
|
$config = new phpbb_config(array_merge($defaults, $new_config));
|
||||||
|
|
||||||
$this->template_path = dirname(__FILE__) . '/templates';
|
$this->template_path = dirname(__FILE__) . '/templates';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user