Remove redundant unit test for WP_Comment_Query 'status'.

This old test is too resource-intensive, and duplicates the more precise
tests introduced in [29980].

See #30017.

git-svn-id: https://develop.svn.wordpress.org/trunk@29981 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2014-10-21 14:17:17 +00:00
parent 11e0a527f7
commit a14c675dea

View File

@ -171,30 +171,6 @@ class Tests_Comment_Query extends WP_UnitTestCase {
$this->assertEquals( 1, count( $comments ) );
}
function test_get_status() {
$post_id = $this->factory->post->create();
$this->factory->comment->create_post_comments( $post_id, 10 );
$post_id2 = $this->factory->post->create();
$this->factory->comment->create_post_comments( $post_id2, 10 );
$post_id3 = $this->factory->post->create();
$this->factory->comment->create_post_comments( $post_id3, 10, array( 'comment_approved' => '0' ) );
$post_id4 = $this->factory->post->create();
$this->factory->comment->create_post_comments( $post_id4, 10, array( 'comment_approved' => 'trash' ) );
$post_id5 = $this->factory->post->create();
$this->factory->comment->create_post_comments( $post_id5, 10, array( 'comment_approved' => 'spam' ) );
$this->assertEquals( 30, count( get_comments() ) );
$this->assertEquals( 30, count( get_comments( array( 'status' => 'all' ) ) ) );
$this->assertEquals( 20, count( get_comments( array( 'status' => 'approve' ) ) ) );
$this->assertEquals( 10, count( get_comments( array( 'status' => 'hold' ) ) ) );
$this->assertEquals( 10, count( get_comments( array( 'status' => 'trash' ) ) ) );
$this->assertEquals( 10, count( get_comments( array( 'status' => 'spam' ) ) ) );
}
/**
* @ticket 27064
*/