Changeset 36056 for trunk/tests/phpunit/tests/term.php
- Timestamp:
- 12/22/2015 01:50:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term.php
r35850 r36056 618 618 619 619 /** 620 * @ticket 35180 621 * @ticket 28922 622 */ 623 public function test_get_the_terms_should_return_results_ordered_by_name_when_pulling_from_cache() { 624 register_taxonomy( 'wptests_tax', 'post' ); 625 $p = self::$post_ids[0]; 626 627 $t1 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'fff' ) ); 628 $t2 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'aaa' ) ); 629 $t3 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'zzz' ) ); 630 631 wp_set_object_terms( $p, array( $t1, $t2, $t3 ), 'wptests_tax' ); 632 update_object_term_cache( $p, 'post' ); 633 634 $found = get_the_terms( $p, 'wptests_tax' ); 635 636 $this->assertSame( array( $t2, $t1, $t3 ), wp_list_pluck( $found, 'term_id' ) ); 637 } 638 639 /** 620 640 * @ticket 19205 621 641 */
Note: See TracChangeset
for help on using the changeset viewer.