Changeset 26187 for trunk/tests/phpunit/tests/term.php
- Timestamp:
- 11/15/2013 02:32:16 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term.php
r26028 r26187 9 9 function setUp() { 10 10 parent::setUp(); 11 12 _clean_term_filters(); 11 13 // insert one term into every post taxonomy 12 14 // otherwise term_ids and term_taxonomy_ids might be identical, which could mask bugs … … 442 444 wp_set_object_terms( $post_id, $term, $this->taxonomy ); 443 445 444 $term = array_shift( wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'all_with_object_id' ) ) ); 446 $terms = wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'all_with_object_id' ) ); 447 $term = array_shift( $terms ); 445 448 $int_fields = array( 'parent', 'term_id', 'count', 'term_group', 'term_taxonomy_id', 'object_id' ); 446 449 foreach ( $int_fields as $field ) 447 450 $this->assertInternalType( 'int', $term->$field, $field ); 448 451 449 $term = array_shift( wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'ids' ) ) ); 452 $terms = wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'ids' ) ); 453 $term = array_shift( $terms ); 450 454 $this->assertInternalType( 'int', $term, 'term' ); 451 455 }
Note: See TracChangeset
for help on using the changeset viewer.