mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Revert [28613] and [28664]. A good idea, but too much BC baggage.
See #28099. git-svn-id: https://develop.svn.wordpress.org/trunk@28783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -203,6 +203,9 @@ class Tests_Tax_Query extends WP_UnitTestCase {
|
||||
$this->assertEquals( array( $posts[0], $posts[3] ), $results2, 'Relation: AND; Operator: IN' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 28099
|
||||
*/
|
||||
function test_empty__in() {
|
||||
$cat_id = $this->factory->category->create();
|
||||
$post_id = $this->factory->post->create();
|
||||
@@ -211,7 +214,7 @@ class Tests_Tax_Query extends WP_UnitTestCase {
|
||||
$q1 = get_posts( array( 'category__in' => array( $cat_id ) ) );
|
||||
$this->assertNotEmpty( $q1 );
|
||||
$q2 = get_posts( array( 'category__in' => array() ) );
|
||||
$this->assertEmpty( $q2 );
|
||||
$this->assertNotEmpty( $q2 );
|
||||
|
||||
$tag = wp_insert_term( 'woo', 'post_tag' );
|
||||
$tag_id = $tag['term_id'];
|
||||
@@ -221,11 +224,11 @@ class Tests_Tax_Query extends WP_UnitTestCase {
|
||||
$q3 = get_posts( array( 'tag__in' => array( $tag_id ) ) );
|
||||
$this->assertNotEmpty( $q3 );
|
||||
$q4 = get_posts( array( 'tag__in' => array() ) );
|
||||
$this->assertEmpty( $q4 );
|
||||
$this->assertNotEmpty( $q4 );
|
||||
|
||||
$q5 = get_posts( array( 'tag_slug__in' => array( $slug ) ) );
|
||||
$this->assertNotEmpty( $q5 );
|
||||
$q6 = get_posts( array( 'tag_slug__in' => array() ) );
|
||||
$this->assertEmpty( $q6 );
|
||||
$this->assertNotEmpty( $q6 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user