Skip to content

Commit 34b3bc7

Browse files
committed
Add test case for false
1 parent 766b3d5 commit 34b3bc7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/phpunit/tests/term/query.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,26 @@ public function test_object_ids_null_should_return_all_terms() {
471471
$this->assertSameSets( $terms, $query->terms, 'When object_ids is null, all terms should be returned without filtering.' );
472472
}
473473

474+
/**
475+
* @ticket 63256
476+
*/
477+
public function test_object_ids_false_should_return_all_terms() {
478+
register_taxonomy( 'wptests_tax_1', 'post' );
479+
480+
$terms = self::factory()->term->create_many( 3, array( 'taxonomy' => 'wptests_tax_1' ) );
481+
482+
$query = new WP_Term_Query(
483+
array(
484+
'taxonomy' => 'wptests_tax_1',
485+
'object_ids' => false,
486+
'hide_empty' => false,
487+
'fields' => 'ids',
488+
)
489+
);
490+
491+
$this->assertSameSets( $terms, $query->terms, 'When object_ids is false, all terms should be returned without filtering.' );
492+
}
493+
474494
/**
475495
* @ticket 63256
476496
*/

0 commit comments

Comments
 (0)