1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

[ticket/13508] Add tests for include_js() and include_css() twig tokens

PHPBB3-13508
This commit is contained in:
Marc Alexander
2021-10-07 21:20:09 +02:00
parent 02e5a7afc4
commit 97034e0776
4 changed files with 72 additions and 44 deletions

View File

@@ -106,4 +106,18 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes
// Run test
$this->run_template('includejs.html', array_merge(array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), $vars), array(), array(), $expected);
}
/**
* @dataProvider template_data
*/
public function test_include_js_compilation($vars, $expected)
{
// Reset the engine state
$this->setup_engine(array('assets_version' => 1));
$this->template->assign_vars($vars);
// Run test
$this->run_template('include_js.html', array_merge(array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), $vars), array(), array(), $expected);
}
}