Changeset 30205 for trunk/tests/phpunit/tests/term/isObjectInTerm.php
- Timestamp:
- 11/03/2014 02:24:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/isObjectInTerm.php
r30204 r30205 82 82 _unregister_taxonomy( 'wptests_tax', 'post' ); 83 83 } 84 85 /** 86 * @ticket 29467 87 */ 88 public function test_should_not_return_true_if_term_name_begins_with_existing_term_id() { 89 register_taxonomy( 'wptests_tax', 'post' ); 90 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 91 92 $post_ID = $this->factory->post->create(); 93 wp_set_object_terms( $post_ID, $t, 'wptests_tax' ); 94 95 $int_tax_name = $t . '_term_name'; 96 97 $this->assertFalse( is_object_in_term( $post_ID, 'wptests_tax', $int_tax_name ) ); 98 99 // Verify it works properly when the post is actually in the term. 100 wp_set_object_terms( $post_ID, array( $int_tax_name ), 'wptests_tax' ); 101 $this->assertTrue( is_object_in_term( $post_ID, 'wptests_tax', $int_tax_name ) ); 102 } 84 103 }
Note: See TracChangeset
for help on using the changeset viewer.