mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/twig] Correct includejs test
PHPBB3-11598
This commit is contained in:
parent
3ca99f8122
commit
8bda356dab
2 changed files with 13 additions and 14 deletions
|
@ -18,16 +18,15 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes
|
||||||
|
|
||||||
// Prepare correct result
|
// Prepare correct result
|
||||||
$scripts = array(
|
$scripts = array(
|
||||||
'<script src="' . $this->test_path . '/templates/parent_and_child.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="parent_and_child.js?assets_version=1"></script>',
|
||||||
'<script src="' . $this->test_path . '/parent_templates/parent_only.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="parent_only.js?assets_version=1"></script>',
|
||||||
'<script src="' . $this->test_path . '/templates/child_only.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="child_only.js?assets_version=1"></script>',
|
||||||
'<script src="' . $this->test_path . '/templates/subdir/parent_only.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="subdir/parent_only.js?assets_version=1"></script>',
|
||||||
'<script src="' . $this->test_path . '/templates/subdir/subsubdir/parent_only.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="subdir/subsubdir/parent_only.js?assets_version=1"></script>',
|
||||||
'<script src="' . $this->test_path . '/templates/subdir/parent_only.js?assets_version=1"></script>',
|
'<script type="text/javascript" src="subdir/parent_only.js?assets_version=1"></script>',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Run test
|
// Run test
|
||||||
$cache_file = $this->template->cachepath . 'includejs.html.php';
|
$this->run_template('includejs.html', array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), array(), array(), implode('', $scripts));
|
||||||
$this->run_template('includejs.html', array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), array(), array(), implode('', $scripts), $cache_file);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!-- INCLUDEJS parent_and_child.js -->
|
<!-- INCLUDEJS 'parent_and_child.js' -->
|
||||||
<!-- INCLUDEJS {PARENT} -->
|
<!-- INCLUDEJS PARENT -->
|
||||||
<!-- DEFINE $TEST = 'child_only.js' -->
|
<!-- DEFINE $TEST = 'child_only.js' -->
|
||||||
<!-- INCLUDEJS {$TEST} -->
|
<!-- INCLUDEJS TEST -->
|
||||||
<!-- INCLUDEJS subdir/{PARENT} -->
|
<!-- INCLUDEJS 'subdir/' ~ PARENT -->
|
||||||
<!-- INCLUDEJS {SUBDIR}/subsubdir/{PARENT} -->
|
<!-- INCLUDEJS SUBDIR ~ '/subsubdir/' ~ PARENT -->
|
||||||
<!-- INCLUDEJS {SUBDIR}/parent_only.{EXT} -->
|
<!-- INCLUDEJS SUBDIR ~ '/parent_only.' ~ EXT -->
|
||||||
{SCRIPTS}
|
{SCRIPTS}
|
||||||
|
|
Loading…
Add table
Reference in a new issue