diff --git tests/phpunit/tests/dependencies/scripts.php tests/phpunit/tests/dependencies/scripts.php
index 3f4e724..d334bc7 100644
|
|
|
class Tests_Dependencies_Scripts extends WP_UnitTestCase { |
| 84 | 84 | // Cleanup |
| 85 | 85 | $wp_scripts->base_url = $base_url_backup; |
| 86 | 86 | } |
| | 87 | |
| | 88 | /** |
| | 89 | * @ticket 25247 |
| | 90 | */ |
| | 91 | function test_do_items_with_alias_and_in_footer() { |
| | 92 | $dep = new WP_Scripts; |
| | 93 | |
| | 94 | $this->assertTrue( $dep->add( 'one', '', array( 'two', 'three' ) ) ); |
| | 95 | $this->assertTrue( $dep->add( 'two', 'two' ) ); |
| | 96 | $this->assertTrue( $dep->add( 'three', 'three' ) ); |
| | 97 | |
| | 98 | $handles = array( 'one', 'two', 'three' ); |
| | 99 | |
| | 100 | foreach ( $handles as $handle ) { |
| | 101 | $this->assertTrue( $dep->add_data( $handle, 'group', 1 ) ); |
| | 102 | $this->assertInstanceOf( '_WP_Dependency', $dep->query( $handle ) ); |
| | 103 | } |
| | 104 | |
| | 105 | $this->assertEmpty( $dep->do_items( $handles, 0 ) ); |
| | 106 | |
| | 107 | $this->assertEmpty( $dep->done ); |
| | 108 | |
| | 109 | $this->assertNotEmpty( $dep->do_items( $handles, 1 ) ); |
| | 110 | |
| | 111 | foreach ( $handles as $handle ) { |
| | 112 | $this->assertContains( $handle, $dep->done ); |
| | 113 | } |
| | 114 | } |
| 87 | 115 | } |