/** * @ticket 20604 */ function test_taxonomy_empty_or() { // An empty tax query should return an empty array, not all posts. $this->factory->post->create_many(10); es_wp_query_index_test_data(); $query = new ES_WP_Query(array('fields' => 'ids', 'tax_query' => array('relation' => 'OR', array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => false, 'operator' => 'IN'), array('taxonomy' => 'category', 'field' => 'id', 'terms' => false, 'operator' => 'IN')))); $posts = $query->get_posts(); $this->assertEquals(0, count($posts)); }