Make WordPress Core


Ignore:
Timestamp:
07/05/2020 07:22:24 PM (19 months ago)
Author:
azaozz
Message:

Build/Test Tools: update PHPUnit tests after [48323]. Disable and keep the specific jQuery Migrate dependency tests for use in WP 5.6.

See #37110.

File:
1 edited

Legend:

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

    r46586 r48324  
    2222        $object = $scripts->query( 'jquery', 'registered' );
    2323        $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        /*
    2429        $this->assertEqualSets( $object->deps, array_keys( $jquery_scripts ) );
    2530        foreach ( $object->deps as $dep ) {
     
    2934            $this->assertEquals( $jquery_scripts[ $dep ], $o->src );
    3035        }
     36        */
    3137    }
    3238
     
    114120        }
    115121
    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)$/' );
    117124
    118125        $scripts->do_items( false, 0 );
     
    123130        $scripts->do_items( false, 1 );
    124131        $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        /*
    125135        $this->assertContains( 'jquery-core', $scripts->done, 'jquery-core in footer' );
    126136        $this->assertContains( 'jquery-migrate', $scripts->done, 'jquery-migrate in footer' );
     137        */
    127138    }
    128139}
Note: See TracChangeset for help on using the changeset viewer.