| | 168 | |
| | 169 | public function test_order_by_include_with_comma_separated_list() { |
| | 170 | |
| | 171 | register_taxonomy( 'wptests_tax_1', 'post' ); |
| | 172 | |
| | 173 | $t1 = self::factory()->term->create_and_get( array( 'taxonomy' => 'wptests_tax_1' ) ); |
| | 174 | $t2 = self::factory()->term->create_and_get( array( 'taxonomy' => 'wptests_tax_1' ) ); |
| | 175 | |
| | 176 | $query = new WP_Term_Query( array( |
| | 177 | 'include' => "{$t1->term_id},{$t2->term_id}", |
| | 178 | 'orderby' => 'include', |
| | 179 | 'hide_empty' => false, |
| | 180 | ) ); |
| | 181 | $terms = $query->get_terms(); |
| | 182 | |
| | 183 | $this->assertEquals( array( $t1, $t2 ), $terms ); |
| | 184 | } |