Changeset 1181 in tests
- Timestamp:
- 01/04/2013 12:22:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/dependencies/jquery.php
r1017 r1181 8 8 9 9 function test_location_of_jquery() { 10 $jquery_scripts = array( 11 'jquery-core' => '/wp-includes/js/jquery/jquery.js', 12 'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.js' 13 ); 10 14 $scripts = new WP_Scripts; 11 15 wp_default_scripts( $scripts ); 12 16 $object = $scripts->query( 'jquery', 'registered' ); 13 17 $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 } 15 25 } 16 26
Note: See TracChangeset
for help on using the changeset viewer.