diff options
author | 2012-03-31 17:38:30 +0300 | |
---|---|---|
committer | 2012-03-31 17:38:30 +0300 | |
commit | 360312f599edd852e14fcd162552e19dd2d278a6 (patch) | |
tree | 89202a7ba57cd9c469b2d21fd4d6c432b410dfb7 /tests | |
parent | [feature/merging-style-components] Fixing few errors in acp_styles (diff) | |
download | phpbb-360312f599edd852e14fcd162552e19dd2d278a6.tar.gz phpbb-360312f599edd852e14fcd162552e19dd2d278a6.tar.bz2 phpbb-360312f599edd852e14fcd162552e19dd2d278a6.zip |
[feature/merging-style-components] Initializing locator and provider separately
Moving locator and path provider initialization out of style class
PHPBB3-10632
Diffstat (limited to 'tests')
-rw-r--r-- | tests/template/template_inheritance_test.php | 4 | ||||
-rw-r--r-- | tests/template/template_test_case.php | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php index f7bd38cc08..aa527a3eb5 100644 --- a/tests/template/template_inheritance_test.php +++ b/tests/template/template_inheritance_test.php @@ -71,7 +71,9 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t $this->template_path = dirname(__FILE__) . '/templates'; $this->parent_template_path = dirname(__FILE__) . '/parent_templates'; - $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, false); + $this->style_resource_locator = new phpbb_style_path_provider(); + $this->style_provider = new phpbb_style_path_provider(); + $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider); $this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), ''); $this->template = $this->style->template; } diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 5884225a54..f324736ba4 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -15,6 +15,8 @@ class phpbb_template_template_test_case extends phpbb_test_case protected $style; protected $template; protected $template_path; + protected $style_resource_locator; + protected $style_provider; // Keep the contents of the cache for debugging? const PRESERVE_CACHE = true; @@ -62,7 +64,9 @@ class phpbb_template_template_test_case extends phpbb_test_case $config = new phpbb_config(array_merge($defaults, $new_config)); $this->template_path = dirname(__FILE__) . '/templates'; - $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, false); + $this->style_resource_locator = new phpbb_style_path_provider(); + $this->style_provider = new phpbb_style_path_provider(); + $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider); $this->style->set_custom_style('tests', $this->template_path, ''); $this->template = $this->style->template; } |