Changeset 48324
- Timestamp:
- 07/05/2020 07:22:24 PM (4 years ago)
- Location:
- trunk/tests/phpunit/tests/dependencies
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/jquery.php
r46586 r48324 22 22 $object = $scripts->query( 'jquery', 'registered' ); 23 23 $this->assertInstanceOf( '_WP_Dependency', $object ); 24 25 // As of 5.5 jQuery 1.12.4 is loaded without Migrate 1.4.1. 26 // Disable, but keep the followint test for 5.6 when jQuery would be updated to 3.5.1+ and 27 // the latest Migrate will be used. 28 /* 24 29 $this->assertEqualSets( $object->deps, array_keys( $jquery_scripts ) ); 25 30 foreach ( $object->deps as $dep ) { … … 29 34 $this->assertEquals( $jquery_scripts[ $dep ], $o->src ); 30 35 } 36 */ 31 37 } 32 38 … … 114 120 } 115 121 116 $this->expectOutputRegex( '/^(?:<script[^>]+><\/script>\\n){2}$/' ); 122 // Match only one script tag fopr 5.5, revert to `{2}` for 5.6. 123 $this->expectOutputRegex( '/^(?:<script[^>]+><\/script>\\n)$/' ); 117 124 118 125 $scripts->do_items( false, 0 ); … … 123 130 $scripts->do_items( false, 1 ); 124 131 $this->assertContains( 'jquery', $scripts->done ); 132 133 // Disable for 5.5 but keep for use in 5.6. See test_location_of_jquery() above. 134 /* 125 135 $this->assertContains( 'jquery-core', $scripts->done, 'jquery-core in footer' ); 126 136 $this->assertContains( 'jquery-migrate', $scripts->done, 'jquery-migrate in footer' ); 137 */ 127 138 } 128 139 } -
trunk/tests/phpunit/tests/dependencies/scripts.php
r48295 r48324 633 633 634 634 $ver = get_bloginfo( 'version' ); 635 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery -core,jquery-migrate&ver={$ver}'></script>\n";635 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n"; 636 636 $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n"; 637 637 $expected .= "<script type='text/javascript' id='test-example-js-after'>\nconsole.log(\"after\");\n</script>\n"; … … 658 658 659 659 $ver = get_bloginfo( 'version' ); 660 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery -core,jquery-migrate&ver={$ver}'></script>\n";660 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n"; 661 661 $expected .= "<!--[if gte IE 9]>\n"; 662 662 $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n"; … … 687 687 688 688 $ver = get_bloginfo( 'version' ); 689 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery -core,jquery-migrate&ver={$ver}'></script>\n";689 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n"; 690 690 $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n"; 691 691 $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n"; … … 713 713 714 714 $ver = get_bloginfo( 'version' ); 715 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery -core,jquery-migrate&ver={$ver}'></script>\n";715 $expected = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery&ver={$ver}'></script>\n"; 716 716 $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n"; 717 717 $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.