WordPress.org

Make WordPress Core

Changeset 48892


Ignore:
Timestamp:
08/27/2020 08:52:36 PM (8 weeks 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.
See #50919.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r48858 r48892  
    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.