From a14c675dea3e9f043d18fbf50863debcb651e81e Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 21 Oct 2014 14:17:17 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/comment/query.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index e150a057ab..0002f23cb8 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -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 */