Changeset 31024 for trunk/tests/phpunit/tests/term/getTerms.php
- Timestamp:
- 01/02/2015 09:33:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerms.php
r30688 r31024 423 423 424 424 $this->assertEquals( array( $t1, $t3 ), $found ); 425 } 426 427 /** 428 * @ticket 30611 429 */ 430 public function test_get_terms_by_name() { 431 $t1 = $this->factory->tag->create( array( 'name' => 'Foo' ) ); 432 $t2 = $this->factory->tag->create( array( 'name' => 'Bar' ) ); 433 434 $found = get_terms( 'post_tag', array( 435 'hide_empty' => false, 436 'fields' => 'ids', 437 'name' => 'Foo', 438 ) ); 439 440 $this->assertEquals( array( $t1 ), $found ); 441 } 442 443 /** 444 * @ticket 30611 445 */ 446 public function test_get_terms_by_multiple_names() { 447 $t1 = $this->factory->tag->create( array( 'name' => 'Foo' ) ); 448 $t2 = $this->factory->tag->create( array( 'name' => 'Bar' ) ); 449 $t3 = $this->factory->tag->create( array( 'name' => 'Barry' ) ); 450 451 $found = get_terms( 'post_tag', array( 452 'hide_empty' => false, 453 'fields' => 'ids', 454 'name' => array( 'Foo', 'Barry' ) 455 ) ); 456 457 $this->assertEqualSets( array( $t3, $t1 ), $found ); 425 458 } 426 459
Note: See TracChangeset
for help on using the changeset viewer.