aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/template/template_test.php10
-rw-r--r--tests/template/templates/includephp.html1
-rw-r--r--tests/template/templates/includephp_relative.html2
3 files changed, 7 insertions, 6 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 9b4023c62c..a9850cd5ef 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -438,16 +438,16 @@ class phpbb_template_template_test extends phpbb_test_case
$GLOBALS['config']['tpl_allow_php'] = false;
}
- public function test_includephp()
+ public function test_includephp_relative()
{
$GLOBALS['config']['tpl_allow_php'] = true;
- $cache_file = $this->template->cachepath . 'includephp.html.php';
+ $cache_file = $this->template->cachepath . 'includephp_relative.html.php';
- $this->run_template('includephp.html', array(), array(), array(), 'testing included php', $cache_file);
+ $this->run_template('includephp_relative.html', array(), array(), array(), "Path is relative to board root.\ntesting included php", $cache_file);
- $this->template->set_filenames(array('test' => 'includephp.html'));
- $this->assertEquals('testing included php', $this->display('test'), "Testing INCLUDEPHP");
+ $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");
$GLOBALS['config']['tpl_allow_php'] = false;
}
diff --git a/tests/template/templates/includephp.html b/tests/template/templates/includephp.html
deleted file mode 100644
index 0a8c1a070c..0000000000
--- a/tests/template/templates/includephp.html
+++ /dev/null
@@ -1 +0,0 @@
-<!-- INCLUDEPHP tests/template/templates/_dummy_include.php.inc -->
diff --git a/tests/template/templates/includephp_relative.html b/tests/template/templates/includephp_relative.html
new file mode 100644
index 0000000000..297c9efcb0
--- /dev/null
+++ b/tests/template/templates/includephp_relative.html
@@ -0,0 +1,2 @@
+Path is relative to board root.
+<!-- INCLUDEPHP ../tests/template/templates/_dummy_include.php.inc -->