Changes from branches/3.7/tests/phpunit/tests/taxonomy.php at r25924 to trunk/tests/phpunit/tests/taxonomy.php at r25596
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy.php
r25924 r25596 153 153 154 154 } 155 /**156 * @ticket 25706157 */158 function test_in_category() {159 $post = $this->factory->post->create_and_get();160 161 // in_category() returns false when first parameter is empty()162 $this->assertFalse( in_category( '', $post ) );163 $this->assertFalse( in_category( false, $post ) );164 $this->assertFalse( in_category( null, $post ) );165 166 // Test expected behavior of in_category()167 $term = wp_insert_term( 'Test', 'category' );168 wp_set_object_terms( $post->ID, $term['term_id'], 'category' );169 $this->assertTrue( in_category( $term['term_id'], $post ) );170 }171 155 }
Note: See TracChangeset
for help on using the changeset viewer.