aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/template/includephp_test.php4
-rw-r--r--tests/template/template_test.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php
index edf1e40bb8..a3dc9bd5c5 100644
--- a/tests/template/includephp_test.php
+++ b/tests/template/includephp_test.php
@@ -33,11 +33,13 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
public function test_includephp_absolute()
{
+ global $phpbb_root_path;
+
$path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
$this->assertTrue(phpbb_is_absolute($path_to_php));
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
- $cache_dir = dirname($this->template->cachepath) . '/';
+ $cache_dir = dirname($phpbb_root_path . 'cache') . '/';
$fp = fopen($cache_dir . 'includephp_absolute.html', 'w');
fputs($fp, $template_text);
fclose($fp);
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 26cfb3a8e4..1b3dda9b2a 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -371,9 +371,11 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
public function test_php()
{
+ global $phpbb_root_path;
+
$template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->';
- $cache_dir = dirname($this->template->cachepath) . '/';
+ $cache_dir = dirname($phpbb_root_path . 'cache') . '/';
$fp = fopen($cache_dir . 'php.html', 'w');
fputs($fp, $template_text);
fclose($fp);