1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00
php-phpbb/tests/template/template_includejs_test.php
Vjacheslav Trushkin 2d9d8d3673 [ticket/10665] New test class for templates with tree
New parent template test class for tests that use styles tree

PHPBB3-10665
2012-04-01 20:37:45 +03:00

32 lines
950 B
PHP

<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
require_once dirname(__FILE__) . '/template_test_case_with_tree.php';
class phpbb_template_template_includejs_test extends phpbb_template_template_test_case_with_tree
{
public function test_includejs_compilation()
{
// Reset the engine state
$this->setup_engine();
// Prepare correct result
$dir = dirname(__FILE__);
$scripts = array(
'<script src="' . $dir . '/templates/parent_and_child.html"></script>',
'<script src="' . $dir . '/parent_templates/parent_only.html"></script>',
'<script src="' . $dir . '/templates/child_only.html"></script>'
);
// Run test
$cache_file = $this->template->cachepath . 'includejs.html.php';
$this->run_template('includejs.html', array('PARENT' => 'parent_only.html'), array(), array(), implode('', $scripts), $cache_file);
}
}