Make WordPress Core

Changeset 1181 in tests

Timestamp:
01/04/2013 12:22:48 AM (12 years ago)
Author:
kurtpayne
Message:

Fixing the location detection for jQuery from [23183]. This will now detect that jQuery is a series of 2 dependencies, and verify that each one is referenced correctly.

File:
1 edited

Legend:

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

    r1017 r1181  
    88
    99    function test_location_of_jquery() {
     10
     11
     12
     13
    1014        $scripts = new WP_Scripts;
    1115        wp_default_scripts( $scripts );
    1216        $object = $scripts->query( 'jquery', 'registered' );
    1317        $this->assertInstanceOf( '_WP_Dependency', $object );
    14         $this->assertEquals( '/wp-includes/js/jquery/jquery.js', $object->src );
     18        $this->assertEqualSets( $object->deps, array_keys( $jquery_scripts ) );
     19        foreach( $object->deps as $dep ) {
     20            $o = $scripts->query( $dep, 'registered' );
     21            $this->assertInstanceOf( '_WP_Dependency', $object );
     22            $this->assertTrue( isset( $jquery_scripts[ $dep ] ) );
     23            $this->assertEquals( $jquery_scripts[ $dep ], $o->src );
     24        }
    1525    }
    1626
Note: See TracChangeset for help on using the changeset viewer.