diff options
| author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-02 12:50:55 -0500 |
|---|---|---|
| committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-02 12:50:55 -0500 |
| commit | 6bbe92a8d020f1fcfa8de0da50714acf88837295 (patch) | |
| tree | e2809ba389647cb39dc4db1dd11743030d82485d /tests | |
| parent | b4947f94ed23270d4dbb498afb31555da2c8af0d (diff) | |
| download | forums-6bbe92a8d020f1fcfa8de0da50714acf88837295.tar forums-6bbe92a8d020f1fcfa8de0da50714acf88837295.tar.gz forums-6bbe92a8d020f1fcfa8de0da50714acf88837295.tar.bz2 forums-6bbe92a8d020f1fcfa8de0da50714acf88837295.tar.xz forums-6bbe92a8d020f1fcfa8de0da50714acf88837295.zip | |
[feature/twig] Move test_php back to template_test
Was originally moved because I thought that a new test file might mean a new
instance and the memory would be cleared, fixing the original problem, but
that isn't true and it was fixed another way.
PHPBB3-11598
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template/template_php_test.php | 30 | ||||
| -rw-r--r-- | tests/template/template_test.php | 16 |
2 files changed, 16 insertions, 30 deletions
diff --git a/tests/template/template_php_test.php b/tests/template/template_php_test.php deleted file mode 100644 index fd4174953c..0000000000 --- a/tests/template/template_php_test.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** -* -* @package testing -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -* -*/ - -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; -require_once dirname(__FILE__) . '/template_test_case.php'; - -class phpbb_template_template_php_test extends phpbb_template_template_test_case -{ - public function test_php() - { - $template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->'; - - $cache_dir = dirname($this->template->cachepath) . '/'; - $fp = fopen($cache_dir . 'php.html', 'w'); - fputs($fp, $template_text); - fclose($fp); - - $this->setup_engine(array('tpl_allow_php' => true)); - - $this->style->set_custom_style('tests', $cache_dir, array(), ''); - - $this->run_template('php.html', array(), array(), array(), 'test'); - } -} diff --git a/tests/template/template_test.php b/tests/template/template_test.php index ad4c8fbd17..26cfb3a8e4 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -369,6 +369,22 @@ class phpbb_template_template_test extends phpbb_template_template_test_case $this->assertEquals($expecting, $this->display('append_var')); } + public function test_php() + { + $template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->'; + + $cache_dir = dirname($this->template->cachepath) . '/'; + $fp = fopen($cache_dir . 'php.html', 'w'); + fputs($fp, $template_text); + fclose($fp); + + $this->setup_engine(array('tpl_allow_php' => true)); + + $this->style->set_custom_style('tests', $cache_dir, array(), ''); + + $this->run_template('php.html', array(), array(), array(), 'test'); + } + public function alter_block_array_data() { return array( |
