| 427 | /** |
| 428 | * @ticket 17646 |
| 429 | */ |
| 430 | function test_get_object_terms_types() { |
| 431 | $post_id = $this->factory->post->create(); |
| 432 | $term = wp_insert_term( 'one', $this->taxonomy ); |
| 433 | wp_set_object_terms( $post_id, $term, $this->taxonomy ); |
| 434 | |
| 435 | $term = array_shift( wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'all_with_object_id' ) ) ); |
| 436 | $int_fields = array( 'parent', 'term_id', 'count', 'term_group', 'term_taxonomy_id', 'object_id' ); |
| 437 | foreach ( $int_fields as $field ) |
| 438 | $this->assertInternalType( 'int', $term->$field, $field ); |
| 439 | |
| 440 | $term = array_shift( wp_get_object_terms( $post_id, $this->taxonomy, array( 'fields' => 'ids' ) ) ); |
| 441 | $this->assertInternalType( 'int', $term, 'term' ); |
| 442 | } |
| 443 | |