diff options
| author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-01 13:06:37 -0500 |
|---|---|---|
| committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-01 13:06:37 -0500 |
| commit | 6f925552a5a9101b3e8083a0bf27b64b3ffd382a (patch) | |
| tree | 3b611884d84556790505edebe19021468b5b57e5 | |
| parent | 341bae40eb8e8238510a2cb1678f9594a3efd29e (diff) | |
| download | forums-6f925552a5a9101b3e8083a0bf27b64b3ffd382a.tar forums-6f925552a5a9101b3e8083a0bf27b64b3ffd382a.tar.gz forums-6f925552a5a9101b3e8083a0bf27b64b3ffd382a.tar.bz2 forums-6f925552a5a9101b3e8083a0bf27b64b3ffd382a.tar.xz forums-6f925552a5a9101b3e8083a0bf27b64b3ffd382a.zip | |
[feature/twig] Fix includephp_from_subdir_test.php
PHPBB3-11598
| -rw-r--r-- | tests/template/subdir/includephp_from_subdir_test.php | 4 | ||||
| -rw-r--r-- | tests/template/template_test_case.php | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/template/subdir/includephp_from_subdir_test.php b/tests/template/subdir/includephp_from_subdir_test.php index 517cb85a30..6f9bc1efa6 100644 --- a/tests/template/subdir/includephp_from_subdir_test.php +++ b/tests/template/subdir/includephp_from_subdir_test.php @@ -19,9 +19,7 @@ class phpbb_template_subdir_includephp_from_subdir_test extends phpbb_template_t { $this->setup_engine(array('tpl_allow_php' => true)); - $cache_file = $this->template->cachepath . 'includephp_relative.html.php'; - - $this->run_template('includephp_relative.html', array(), array(), array(), "Path is relative to board root.\ntesting included php", $cache_file); + $this->run_template('includephp_relative.html', array(), array(), array(), "Path is relative to board root.\ntesting included php"); $this->template->set_filenames(array('test' => 'includephp_relative.html')); $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 0a12dff9f4..d3f1cc4646 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -105,9 +105,13 @@ class phpbb_template_template_test_case extends phpbb_test_case $this->template->destroy_block_vars($block); } - foreach ($lang_vars as $name => $value) + // Previous functionality was $cachefile (string), which was removed, check to prevent errors + if (is_array($lang_vars)) { - $this->user->lang[$name] = $value; + foreach ($lang_vars as $name => $value) + { + $this->user->lang[$name] = $value; + } } $expected = str_replace(array("\n", "\r", "\t"), '', $expected); |
