Changeset 64470
- Timestamp:
- 10/17/2026 11:38:17 PM (6 days ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 1 added
- 1 edited
-
category/inCategory.php (added)
-
taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy.php
r63882 r64470 473 473 } 474 474 475 /**476 * @ticket 25706477 */478 public function test_in_category() {479 $post = self::factory()->post->create_and_get();480 481 // in_category() returns false when first parameter is empty().482 $this->assertFalse( in_category( '', $post ) );483 $this->assertFalse( in_category( false, $post ) );484 $this->assertFalse( in_category( null, $post ) );485 486 // Test expected behavior of in_category().487 $term = wp_insert_term( 'Test', 'category' );488 wp_set_object_terms( $post->ID, $term['term_id'], 'category' );489 $this->assertTrue( in_category( $term['term_id'], $post ) );490 }491 492 475 public function test_insert_category_create() { 493 476 $cat = array(
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)