diff options
author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-15 21:12:13 +0200 |
---|---|---|
committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-15 21:12:13 +0200 |
commit | d25b607ca16bfd240f3b9cb9da7e4567b426ec26 (patch) | |
tree | 4c5ea2b82b6509673e5930c6e1bdaa171265f100 | |
parent | fd96f97dc3c659e1d2e9b58420d652ad79387fbf (diff) | |
download | forums-d25b607ca16bfd240f3b9cb9da7e4567b426ec26.tar forums-d25b607ca16bfd240f3b9cb9da7e4567b426ec26.tar.gz forums-d25b607ca16bfd240f3b9cb9da7e4567b426ec26.tar.bz2 forums-d25b607ca16bfd240f3b9cb9da7e4567b426ec26.tar.xz forums-d25b607ca16bfd240f3b9cb9da7e4567b426ec26.zip |
[feature/merging-style-components] Updating test cases
Updating code in test cases for new template classes.
PHPBB3-10632
-rw-r--r-- | tests/template/includephp_test.php | 2 | ||||
-rw-r--r-- | tests/template/template_inheritance_test.php | 2 | ||||
-rw-r--r-- | tests/template/template_test.php | 4 | ||||
-rw-r--r-- | tests/template/template_test_case.php | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php index 28ea118a13..626735f15f 100644 --- a/tests/template/includephp_test.php +++ b/tests/template/includephp_test.php @@ -36,7 +36,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case $this->setup_engine(array('tpl_allow_php' => true)); - $this->template->set_custom_template($cache_dir, 'tests'); + $this->style->set_custom_style('tests', $cache_dir); $cache_file = $this->template->cachepath . 'includephp_absolute.html.php'; $this->run_template('includephp_absolute.html', array(), array(), array(), "Path is absolute.\ntesting included php", $cache_file); diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php index 2c67b38641..f7bd38cc08 100644 --- a/tests/template/template_inheritance_test.php +++ b/tests/template/template_inheritance_test.php @@ -72,7 +72,7 @@ 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->set_custom_style('tests', array($this->template_path, $this->parent_template_path), ''); $this->template = $this->style->template; - $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path, 'parent'); } } diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 76b1af68d8..edf621e16c 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -277,7 +277,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case $this->template->set_filenames(array('test' => $filename)); $this->assertFileNotExists($this->template_path . '/' . $filename, 'Testing missing file, file cannot exist'); - $expecting = sprintf('template locator: File for handle test does not exist. Could not find: %s', realpath($this->template_path . '/../') . '/templates/' . $filename); + $expecting = sprintf('style resource locator: File for handle test does not exist. Could not find: %s', realpath($this->template_path . '/../') . '/templates/' . $filename); $this->setExpectedTriggerError(E_USER_ERROR, $expecting); $this->display('test'); @@ -285,7 +285,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case public function test_empty_file() { - $expecting = 'template locator: set_filenames: Empty filename specified for test'; + $expecting = 'style resource locator: set_filenames: Empty filename specified for test'; $this->setExpectedTriggerError(E_USER_ERROR, $expecting); $this->template->set_filenames(array('test' => '')); diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index a0e980621d..5884225a54 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -63,8 +63,8 @@ class phpbb_template_template_test_case extends phpbb_test_case $this->template_path = dirname(__FILE__) . '/templates'; $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, false); + $this->style->set_custom_style('tests', $this->template_path, ''); $this->template = $this->style->template; - $this->template->set_custom_template($this->template_path, 'tests'); } protected function setUp() |