Changeset 27458 for trunk/tests/phpunit/tests/term/getTerms.php
- Timestamp:
- 03/07/2014 07:29:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerms.php
r27197 r27458 277 277 278 278 $terms = get_terms( $tax, array( 'parent' => 0, 'cache_domain' => $tax ) ); 279 $this->assert NotEmpty( $terms);279 $this->assertEquals( 2, count( $terms ) ); 280 280 $this->assertEquals( wp_list_pluck( $terms, 'name' ), array( 'Cheese', 'Crackers' ) ); 281 281 } … … 297 297 298 298 $terms = get_terms( $tax, array( 'parent' => 0, 'cache_domain' => $tax ) ); 299 $this->assert NotEmpty( $terms);299 $this->assertEquals( 1, count( $terms ) ); 300 300 $this->assertEquals( array( 'Cheese' ), wp_list_pluck( $terms, 'name' ) ); 301 301 … … 321 321 322 322 $terms = get_terms( $tax, array( 'parent' => 0, 'cache_domain' => $tax ) ); 323 $this->assert NotEmpty( $terms);323 $this->assertEquals( 1, count( $terms ) ); 324 324 $this->assertEquals( array( 'term1' ), wp_list_pluck( $terms, 'name' ) ); 325 325 326 326 _unregister_taxonomy( $tax ); 327 327 } 328 329 /** 330 * @ticket 27123 331 */ 332 function test_get_terms_child_of() { 333 $parent = $this->factory->category->create(); 334 $child = $this->factory->category->create( array( 'parent' => $parent ) ); 335 336 $terms = get_terms( 'category', array( 'child_of' => $parent, 'hide_empty' => false ) ); 337 $this->assertEquals( 1, count( $terms ) ); 338 } 328 339 }
Note: See TracChangeset
for help on using the changeset viewer.