File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
tests/phpunit/tests/dependencies Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2130,14 +2130,17 @@ public function test_wp_add_inline_script_after_with_concat_and_conditional_and_
21302130 * @ticket 63821
21312131 */
21322132 public function test_wp_add_inline_script_before_with_concat_and_core_dependency () {
2133- global $ wp_scripts ;
2133+ global $ wp_scripts, $ wp_version ;
21342134
21352135 wp_default_scripts ( $ wp_scripts );
21362136 wp_default_packages ( $ wp_scripts );
21372137
21382138 $ wp_scripts ->base_url = '' ;
21392139 $ wp_scripts ->do_concat = true ;
2140- $ expected = '' ;
2140+
2141+ $ expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate&ver= {$ wp_version }'></script> \n" ;
2142+ $ expected .= "<script type='text/javascript' id='test-example-js-before'> \n/* <![CDATA[ */ \nconsole.log( \"before \"); \n/* ]]> */ \n</script> \n" ;
2143+ $ expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script> \n" ;
21412144
21422145 wp_enqueue_script ( 'test-example ' , 'http://example.com ' , array ( 'jquery ' ), null );
21432146 wp_add_inline_script ( 'test-example ' , 'console.log("before"); ' , 'before ' );
You can’t perform that action at this time.
0 commit comments