Tests: Update wp_add_inline_script()
unit tests to account for the jquery
handle being an alias for jquery-core
again.
Follow-up to [48323], [48324], [48890]. Props davidbaumwald, audrasjb. See #50919. git-svn-id: https://develop.svn.wordpress.org/trunk@48892 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6a6241ac6a
commit
0d26989e15
@ -632,7 +632,7 @@ JS;
|
||||
$wp_scripts->do_concat = true;
|
||||
|
||||
$ver = get_bloginfo( 'version' );
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n";
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core&ver={$ver}'></script>\n";
|
||||
$expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' id='test-example-js-after'>\nconsole.log(\"after\");\n</script>\n";
|
||||
|
||||
@ -657,7 +657,7 @@ JS;
|
||||
$wp_scripts->do_concat = true;
|
||||
|
||||
$ver = get_bloginfo( 'version' );
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n";
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core&ver={$ver}'></script>\n";
|
||||
$expected .= "<!--[if gte IE 9]>\n";
|
||||
$expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' id='test-example-js-after'>\nconsole.log(\"after\");\n</script>\n";
|
||||
@ -686,7 +686,7 @@ JS;
|
||||
$wp_scripts->do_concat = true;
|
||||
|
||||
$ver = get_bloginfo( 'version' );
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n";
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core&ver={$ver}'></script>\n";
|
||||
$expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
|
||||
$expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
|
||||
|
||||
@ -712,7 +712,7 @@ JS;
|
||||
$wp_scripts->do_concat = true;
|
||||
|
||||
$ver = get_bloginfo( 'version' );
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n";
|
||||
$expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core&ver={$ver}'></script>\n";
|
||||
$expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
|
||||
$expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' src='/wp-includes/js/dist/vendor/wp-polyfill.min.js' id='wp-polyfill-js'></script>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user