Changeset 38667 for trunk/tests/phpunit/tests/term/wpGetObjectTerms.php
- Timestamp:
- 09/28/2016 03:54:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/wpGetObjectTerms.php
r37567 r38667 24 24 25 25 // make sure they're correct 26 $terms = wp_get_object_terms($post_id, $this->taxonomy, array('fields' => 'slugs', 'orderby' => 't .term_id'));26 $terms = wp_get_object_terms($post_id, $this->taxonomy, array('fields' => 'slugs', 'orderby' => 'term_id')); 27 27 $this->assertEquals( $terms_1_slugs, $terms ); 28 28 } … … 361 361 */ 362 362 public function test_parent() { 363 $t1 = self::factory()->term->create( array( 364 'taxonomy' => $this->taxonomy, 365 ) ); 366 $t2 = self::factory()->term->create( array( 367 'taxonomy' => $this->taxonomy, 368 ) ); 369 $t3 = self::factory()->term->create( array( 370 'taxonomy' => $this->taxonomy, 363 register_taxonomy( 'wptests_tax2', 'post', array( 364 'hierarchical' => true, 365 ) ); 366 367 $t1 = self::factory()->term->create( array( 368 'taxonomy' => 'wptests_tax2', 369 ) ); 370 $t2 = self::factory()->term->create( array( 371 'taxonomy' => 'wptests_tax2', 372 ) ); 373 $t3 = self::factory()->term->create( array( 374 'taxonomy' => 'wptests_tax2', 371 375 'parent' => $t1, 372 376 ) ); 373 377 $t4 = self::factory()->term->create( array( 374 'taxonomy' => $this->taxonomy,378 'taxonomy' => 'wptests_tax2', 375 379 'parent' => $t2, 376 380 ) ); … … 378 382 $p = self::factory()->post->create(); 379 383 380 wp_set_object_terms( $p, array( $t1, $t2, $t3, $t3 ), $this->taxonomy);381 382 $found = wp_get_object_terms( $p, $this->taxonomy, array(384 wp_set_object_terms( $p, array( $t1, $t2, $t3, $t3 ), 'wptests_tax2' ); 385 386 $found = wp_get_object_terms( $p, 'wptests_tax2', array( 383 387 'parent' => $t1, 384 388 'fields' => 'ids',
Note: See TracChangeset
for help on using the changeset viewer.