mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/10800] Changing html to js for includejs tests
Changing .html to .js files for includejs tests PHPBB3-10800
This commit is contained in:
parent
51347ebc09
commit
5114edcafe
1
tests/template/parent_templates/parent_and_child.js
Normal file
1
tests/template/parent_templates/parent_and_child.js
Normal file
@ -0,0 +1 @@
|
||||
// JavaScript file in a parent style.
|
1
tests/template/parent_templates/parent_only.js
Normal file
1
tests/template/parent_templates/parent_only.js
Normal file
@ -0,0 +1 @@
|
||||
// JavaScript file only in parent style.
|
@ -18,13 +18,13 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes
|
||||
|
||||
// Prepare correct result
|
||||
$scripts = array(
|
||||
'<script src="' . $this->test_path . '/templates/parent_and_child.html?assets_version=1"></script>',
|
||||
'<script src="' . $this->test_path . '/parent_templates/parent_only.html?assets_version=1"></script>',
|
||||
'<script src="' . $this->test_path . '/templates/child_only.html?assets_version=1"></script>'
|
||||
'<script src="' . $this->test_path . '/templates/parent_and_child.js?assets_version=1"></script>',
|
||||
'<script src="' . $this->test_path . '/parent_templates/parent_only.js?assets_version=1"></script>',
|
||||
'<script src="' . $this->test_path . '/templates/child_only.js?assets_version=1"></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);
|
||||
$this->run_template('includejs.html', array('PARENT' => 'parent_only.js'), array(), array(), implode('', $scripts), $cache_file);
|
||||
}
|
||||
}
|
||||
|
1
tests/template/templates/child_only.js
Normal file
1
tests/template/templates/child_only.js
Normal file
@ -0,0 +1 @@
|
||||
// JavaScript file only in a child style.
|
@ -1,5 +1,5 @@
|
||||
<!-- INCLUDEJS parent_and_child.html -->
|
||||
<!-- INCLUDEJS parent_and_child.js -->
|
||||
<!-- INCLUDEJS {PARENT} -->
|
||||
<!-- DEFINE $TEST = 'child_only.html' -->
|
||||
<!-- DEFINE $TEST = 'child_only.js' -->
|
||||
<!-- INCLUDEJS {$TEST} -->
|
||||
{SCRIPTS}
|
1
tests/template/templates/parent_and_child.js
Normal file
1
tests/template/templates/parent_and_child.js
Normal file
@ -0,0 +1 @@
|
||||
// JavaScript file in a child style.
|
Loading…
x
Reference in New Issue
Block a user