diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-12 20:09:41 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-12 20:13:32 -0400 |
| commit | 94560d708649df876f8486d4ba5361475037f1ff (patch) | |
| tree | 6c24ddd25b5ba07383e24beff032c3f45f77a3db /tests/template | |
| parent | d2ac05aa74d3a1c9723be41a4c0ffe86542f223f (diff) | |
| download | forums-94560d708649df876f8486d4ba5361475037f1ff.tar forums-94560d708649df876f8486d4ba5361475037f1ff.tar.gz forums-94560d708649df876f8486d4ba5361475037f1ff.tar.bz2 forums-94560d708649df876f8486d4ba5361475037f1ff.tar.xz forums-94560d708649df876f8486d4ba5361475037f1ff.zip | |
[feature/template-engine] Make INCLUDEPHP relative to board root.
PHPBB3-9726
Diffstat (limited to 'tests/template')
| -rw-r--r-- | tests/template/template_test.php | 10 | ||||
| -rw-r--r-- | tests/template/templates/includephp.html | 1 | ||||
| -rw-r--r-- | tests/template/templates/includephp_relative.html | 2 |
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 --> |
