mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/twig] template->cachepath is now private, missed checking tests
PHPBB3-11598
This commit is contained in:
parent
6bbe92a8d0
commit
2507c648fe
2 changed files with 6 additions and 2 deletions
|
@ -33,11 +33,13 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
|
||||||
|
|
||||||
public function test_includephp_absolute()
|
public function test_includephp_absolute()
|
||||||
{
|
{
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
$path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
|
$path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
|
||||||
$this->assertTrue(phpbb_is_absolute($path_to_php));
|
$this->assertTrue(phpbb_is_absolute($path_to_php));
|
||||||
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
|
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
|
||||||
|
|
||||||
$cache_dir = dirname($this->template->cachepath) . '/';
|
$cache_dir = dirname($phpbb_root_path . 'cache') . '/';
|
||||||
$fp = fopen($cache_dir . 'includephp_absolute.html', 'w');
|
$fp = fopen($cache_dir . 'includephp_absolute.html', 'w');
|
||||||
fputs($fp, $template_text);
|
fputs($fp, $template_text);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
|
@ -371,9 +371,11 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||||
|
|
||||||
public function test_php()
|
public function test_php()
|
||||||
{
|
{
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
$template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->';
|
$template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->';
|
||||||
|
|
||||||
$cache_dir = dirname($this->template->cachepath) . '/';
|
$cache_dir = dirname($phpbb_root_path . 'cache') . '/';
|
||||||
$fp = fopen($cache_dir . 'php.html', 'w');
|
$fp = fopen($cache_dir . 'php.html', 'w');
|
||||||
fputs($fp, $template_text);
|
fputs($fp, $template_text);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue