mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
[feature/template-engine] Moved includephp test to its own file.
PHPBB3-9726
This commit is contained in:
27
tests/template/includephp_test.php
Normal file
27
tests/template/includephp_test.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/template_test_case.php';
|
||||
|
||||
class phpbb_template_includephp_test extends phpbb_template_template_test_case
|
||||
{
|
||||
public function test_includephp_relative()
|
||||
{
|
||||
$GLOBALS['config']['tpl_allow_php'] = true;
|
||||
|
||||
$cache_file = $this->template->cachepath . 'includephp_relative.html.php';
|
||||
|
||||
$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_relative.html'));
|
||||
$this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
|
||||
|
||||
$GLOBALS['config']['tpl_allow_php'] = false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user