* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
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 template_data()
{
$this->setup_engine();
return array(
/*
array(
// vars
// expected
),
*/
array(
array('TEST' => 1),
'',
),
array(
array('TEST' => 2),
'',
),
array(
array('TEST' => 3),
'',
),
array(
array('TEST' => 4),
'',
),
array(
array('TEST' => 6),
'',
),
array(
array('TEST' => 7),
'',
),
array(
array('TEST' => 8),
'',
),
array(
array('TEST' => 9),
'',
),
array(
array('TEST' => 10),
'',
),
array(
array('TEST' => 11),
'',
),
array(
array('TEST' => 12),
'',
),
array(
array('TEST' => 14),
'',
),
array(
array('TEST' => 15),
'',
),
array(
array('TEST' => 16),
'',
),
array(
array('TEST' => 17),
'',
),
array(
array('TEST' => 18),
'',
),
);
}
/**
* @dataProvider template_data
*/
public function test_includejs_compilation($vars, $expected)
{
// Reset the engine state
$this->setup_engine(array('assets_version' => 1));
$this->template->assign_vars($vars);
// Run test
$this->run_template('includejs.html', array_merge(array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), $vars), array(), array(), $expected);
}
}