aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/template/subdir/includephp_from_subdir_test.php4
-rw-r--r--tests/template/template_test_case.php8
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);