1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-08 00:25:19 +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:
Andreas Fischer 2012-03-07 12:37:53 +01:00
commit 0eb7f18c98
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';