Make WordPress Core

Changeset 48893


Ignore:
Timestamp:
08/27/2020 09:06:13 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.
Merges [48892] to the 5.5 branch.
See #50919.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/tests/phpunit/tests/dependencies/scripts.php

    r48466 r48893  
    633633
    634634        $ver       = get_bloginfo( 'version' );
    635         $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery&amp;ver={$ver}'></script>\n";
     635        $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core&amp;ver={$ver}'></script>\n";
    636636        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
    637637        $expected .= "<script type='text/javascript' id='test-example-js-after'>\nconsole.log(\"after\");\n</script>\n";
     
    658658
    659659        $ver       = get_bloginfo( 'version' );
    660         $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery&amp;ver={$ver}'></script>\n";
     660        $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core&amp;ver={$ver}'></script>\n";
    661661        $expected .= "<!--[if gte IE 9]>\n";
    662662        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
     
    687687
    688688        $ver       = get_bloginfo( 'version' );
    689         $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery&amp;ver={$ver}'></script>\n";
     689        $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core&amp;ver={$ver}'></script>\n";
    690690        $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
    691691        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
     
    713713
    714714        $ver       = get_bloginfo( 'version' );
    715         $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery&amp;ver={$ver}'></script>\n";
     715        $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core&amp;ver={$ver}'></script>\n";
    716716        $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
    717717        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
Note: See TracChangeset for help on using the changeset viewer.