diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-13 08:46:46 -0700 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-13 08:46:46 -0700 |
commit | d879acb7cca1a05a9adacc2376ab4118bd81ab4a (patch) | |
tree | 2e6fab44d276f34f00fc32751f34f532e44c6ec1 /tests/template | |
parent | fd10d97cb1e6c43b88b923bab1015cafe03d379c (diff) | |
parent | f5c2119e7cd0359614300be9a2bd116965a1ec7c (diff) | |
download | forums-d879acb7cca1a05a9adacc2376ab4118bd81ab4a.tar forums-d879acb7cca1a05a9adacc2376ab4118bd81ab4a.tar.gz forums-d879acb7cca1a05a9adacc2376ab4118bd81ab4a.tar.bz2 forums-d879acb7cca1a05a9adacc2376ab4118bd81ab4a.tar.xz forums-d879acb7cca1a05a9adacc2376ab4118bd81ab4a.zip |
Merge pull request #1519 from cyberalien/ticket/11647
Fix INCLUDEJS URLs handling
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/template_includejs_test.php | 26 | ||||
-rw-r--r-- | tests/template/templates/includejs.html | 8 |
2 files changed, 14 insertions, 20 deletions
diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php index ea5c30891b..b67fa123a1 100644 --- a/tests/template/template_includejs_test.php +++ b/tests/template/template_includejs_test.php @@ -26,19 +26,15 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes ), array( array('TEST' => 2), - '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?assets_version=0&assets_version=1"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?assets_version=0"></script>', ), array( array('TEST' => 3), - '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1&assets_version=0&assets_version=1"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1&assets_version=0"></script>', ), array( array('TEST' => 4), - '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1&assets_version=0&assets_version=1"></script>', - ), - array( - array('TEST' => 5), - '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1;assets_version=0&assets_version=1"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1&assets_version=0"></script>', ), array( array('TEST' => 6), @@ -62,19 +58,15 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes ), array( array('TEST' => 11), - '<script type="text/javascript" src="' . $this->test_path . '/templates/child_only.js?test1=1&test2=2&assets_version=1#test3"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/templates/child_only.js?test1=1&test2=2&assets_version=1#test3"></script>', ), array( array('TEST' => 12), - '<script type="text/javascript" src="' . $this->test_path . '/parent_templates/parent_only.js?test1=1&test2=2&assets_version=1#test3"></script>', - ), - array( - array('TEST' => 13), - '<script type="text/javascript" src="' . $this->test_path . '/parent_templates/parent_only.js?test1=1;test2=2&assets_version=1#test3"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/parent_templates/parent_only.js?test1=1&test2=2&assets_version=1#test3"></script>', ), array( array('TEST' => 14), - '<script type="text/javascript" src="' . $this->test_path . '/parent_templates/parent_only.js?test1="&assets_version=1#test3"></script>', + '<script type="text/javascript" src="' . $this->test_path . '/parent_templates/parent_only.js?test1="&assets_version=1#test3"></script>', ), array( array('TEST' => 15), @@ -82,12 +74,16 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes ), array( array('TEST' => 16), - '<script type="text/javascript" src="http://phpbb.com/b.js?c=d&assets_version=1#f"></script>', + '<script type="text/javascript" src="http://phpbb.com/b.js?c=d&assets_version=2#f"></script>', ), array( array('TEST' => 17), '<script type="text/javascript" src="//phpbb.com/b.js"></script>', ), + array( + array('TEST' => 18), + '<script type="text/javascript" src="' . $this->test_path . '/templates/parent_and_child.js?test=1&test2=0&assets_version=1"></script>', + ), ); } diff --git a/tests/template/templates/includejs.html b/tests/template/templates/includejs.html index 3bcad76af5..0bcdf1a815 100644 --- a/tests/template/templates/includejs.html +++ b/tests/template/templates/includejs.html @@ -6,8 +6,6 @@ <!-- INCLUDEJS parent_and_child.js?test=1&assets_version=0 --> <!-- ELSEIF TEST === 4 --> <!-- INCLUDEJS parent_and_child.js?test=1&assets_version=0 --> -<!-- ELSEIF TEST === 5 --> - <!-- INCLUDEJS parent_and_child.js?test=1;assets_version=0 --> <!-- ELSEIF TEST === 6 --> <!-- INCLUDEJS {PARENT} --> <!-- ELSEIF TEST === 7 --> @@ -24,15 +22,15 @@ <!-- INCLUDEJS {$TEST} --> <!-- ELSEIF TEST === 12 --> <!-- INCLUDEJS parent_only.js?test1=1&test2=2#test3 --> -<!-- ELSEIF TEST === 13 --> - <!-- INCLUDEJS parent_only.js?test1=1;test2=2#test3 --> <!-- ELSEIF TEST === 14 --> <!-- INCLUDEJS parent_only.js?test1="#test3 --> <!-- ELSEIF TEST === 15 --> <!-- INCLUDEJS http://phpbb.com/b.js?c=d#f --> <!-- ELSEIF TEST === 16 --> - <!-- INCLUDEJS http://phpbb.com/b.js?c=d&assets_version=1#f --> + <!-- INCLUDEJS http://phpbb.com/b.js?c=d&assets_version=2#f --> <!-- ELSEIF TEST === 17 --> <!-- INCLUDEJS //phpbb.com/b.js --> +<!-- ELSEIF TEST === 18 --> + <!-- INCLUDEJS parent_and_child.js?test=1&test2=0 --> <!-- ENDIF --> {$SCRIPTS} |