Changeset 49101 for trunk/tests/phpunit/tests/dependencies/jquery.php
- Timestamp:
- 10/07/2020 04:31:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/jquery.php
r48939 r49101 11 11 wp_default_scripts( $scripts ); 12 12 13 $jquery_scripts = array(14 'jquery-core' => '/wp-includes/js/jquery/jquery.js',15 );16 13 if ( SCRIPT_DEBUG ) { 17 $jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.js'; 14 $jquery_scripts = array( 15 'jquery-core' => '/wp-includes/js/jquery/jquery.js', 16 'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.js', 17 ); 18 18 } else { 19 $jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.min.js'; 19 $jquery_scripts = array( 20 'jquery-core' => '/wp-includes/js/jquery/jquery.min.js', 21 'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.min.js', 22 ); 20 23 } 21 24 … … 23 26 $this->assertInstanceOf( '_WP_Dependency', $object ); 24 27 25 // As of 5.5 jQuery 1.12.4 is loaded without Migrate 1.4.1. 26 // Disable, but keep the following test for 5.6 when jQuery would be updated to 3.5.1+ and 27 // the latest Migrate will be used. 28 /* 28 // The following test is disabled in WP 5.5 as jQuery 1.12.4 is loaded without jQuery Migrate 1.4.1, 29 // and reenabled in 5.6 when jQuery 3.5.1 is loaded with jQuery Migrate 3.3.1. 29 30 $this->assertSameSets( $object->deps, array_keys( $jquery_scripts ) ); 30 31 foreach ( $object->deps as $dep ) { … … 34 35 $this->assertSame( $jquery_scripts[ $dep ], $o->src ); 35 36 } 36 */37 37 } 38 38 … … 121 121 122 122 // Match only one script tag for 5.5, revert to `{2}` for 5.6. 123 $this->expectOutputRegex( '/^(?:<script[^>]+><\/script>\\n){ 1}$/' );123 $this->expectOutputRegex( '/^(?:<script[^>]+><\/script>\\n){2}$/' ); 124 124 125 125 $scripts->do_items( false, 0 ); … … 131 131 $this->assertContains( 'jquery', $scripts->done ); 132 132 133 // Disable for 5.5 but keep for use in 5.6. See test_location_of_jquery() above.134 / *133 // The following test is disabled in WP 5.5 as jQuery 1.12.4 is loaded without jQuery Migrate 1.4.1, 134 // and reenabled in 5.6 when jQuery 3.5.1 is loaded with Migrate 3.3.1. 135 135 $this->assertContains( 'jquery-core', $scripts->done, 'jquery-core in footer' ); 136 136 $this->assertContains( 'jquery-migrate', $scripts->done, 'jquery-migrate in footer' ); 137 */138 137 } 139 138 }
Note: See TracChangeset
for help on using the changeset viewer.