diff options
author | Nils Adermann <naderman@naderman.de> | 2012-11-10 07:46:50 -0800 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2012-11-10 07:46:50 -0800 |
commit | f0cfae1f014e5defd373bac74b5d915fc3568c7a (patch) | |
tree | 04f0c8ef151c7e8e0d7adf2452624c24c4a71dd8 /tests/template/includephp_test.php | |
parent | 3f933c6870188d0e47e186fddfdc4f3b56a57009 (diff) | |
parent | a05f354fdf903d00e85d8e4ad1d50f9ef906534d (diff) | |
download | forums-f0cfae1f014e5defd373bac74b5d915fc3568c7a.tar forums-f0cfae1f014e5defd373bac74b5d915fc3568c7a.tar.gz forums-f0cfae1f014e5defd373bac74b5d915fc3568c7a.tar.bz2 forums-f0cfae1f014e5defd373bac74b5d915fc3568c7a.tar.xz forums-f0cfae1f014e5defd373bac74b5d915fc3568c7a.zip |
Merge pull request #881 from Fyorl/ticket/10970
Allow INCLUDE template macros to accept paths of the form {FOO}/a/{BAR}/c
Diffstat (limited to 'tests/template/includephp_test.php')
-rw-r--r-- | tests/template/includephp_test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php index f008a734eb..c93a53e2ad 100644 --- a/tests/template/includephp_test.php +++ b/tests/template/includephp_test.php @@ -23,6 +23,18 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); } + public function test_includephp_variables() + { + $this->setup_engine(array('tpl_allow_php' => true)); + + $cache_file = $this->template->cachepath . 'includephp_variables.html.php'; + + $this->run_template('includephp_variables.html', array('TEMPLATES' => 'templates'), array(), array(), "Path includes variables.\ntesting included php", $cache_file); + + $this->template->set_filenames(array('test' => 'includephp_variables.html')); + $this->assertEquals("Path includes variables.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP"); + } + public function test_includephp_absolute() { $path_to_php = dirname(__FILE__) . '/templates/_dummy_include.php.inc'; |