Changeset 25711
- Timestamp:
- 10/07/2013 02:17:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies.php
r25002 r25711 137 137 138 138 } 139 140 /**141 * @ticket 22229142 */143 function test_add_deps_should_add_one_string_dep() {144 $dep = new WP_Dependencies;145 $dep->add( 'baba', '', array( 'dep0' ) );146 $dep->add_deps( 'baba', 'new-dep' );147 $this->assertEquals( array( 'dep0', 'new-dep' ), $dep->query( 'baba' )->deps );148 }149 150 /**151 * @ticket 22229152 */153 function test_add_deps_should_merge_deps() {154 $dep = new WP_Dependencies;155 $dep->add( 'baba', '', array( 'dep0' ) );156 $dep->add_deps( 'baba', array( 'new-dep', 'another-dep' ) );157 $this->assertEquals( array( 'dep0', 'new-dep', 'another-dep' ), $dep->query( 'baba' )->deps );158 }159 160 /**161 * @ticket 22229162 */163 function test_add_deps_should_return_false_on_non_string_non_array_deps() {164 $dep = new WP_Dependencies;165 $dep->add( 'baba', '', array( 'dep0' ) );166 $this->assertFalse( $dep->add_deps( 'baba', 5 ) );167 }168 169 /**170 * @ticket 22229171 */172 function test_add_deps_should_return_false_on_non_registered_handle() {173 $dep = new WP_Dependencies;174 $this->assertFalse( $dep->add_deps( 'baba', 'dep0' ) );175 }176 139 }
Note: See TracChangeset
for help on using the changeset viewer.