Make WordPress Core

Changeset 29981


Ignore:
Timestamp:
10/21/2014 02:17:17 PM (9 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/query.php

    r29980 r29981  
    172172    }
    173173
    174     function test_get_status() {
    175         $post_id = $this->factory->post->create();
    176         $this->factory->comment->create_post_comments( $post_id, 10 );
    177 
    178         $post_id2 = $this->factory->post->create();
    179         $this->factory->comment->create_post_comments( $post_id2, 10 );
    180 
    181         $post_id3 = $this->factory->post->create();
    182         $this->factory->comment->create_post_comments( $post_id3, 10, array( 'comment_approved' => '0' ) );
    183 
    184         $post_id4 = $this->factory->post->create();
    185         $this->factory->comment->create_post_comments( $post_id4, 10, array( 'comment_approved' => 'trash' ) );
    186 
    187         $post_id5 = $this->factory->post->create();
    188         $this->factory->comment->create_post_comments( $post_id5, 10, array( 'comment_approved' => 'spam' ) );
    189 
    190         $this->assertEquals( 30, count( get_comments() ) );
    191         $this->assertEquals( 30, count( get_comments( array( 'status' => 'all' ) ) ) );
    192         $this->assertEquals( 20, count( get_comments( array( 'status' => 'approve' ) ) ) );
    193         $this->assertEquals( 10, count( get_comments( array( 'status' => 'hold' ) ) ) );
    194         $this->assertEquals( 10, count( get_comments( array( 'status' => 'trash' ) ) ) );
    195         $this->assertEquals( 10, count( get_comments( array( 'status' => 'spam' ) ) ) );
    196     }
    197 
    198174    /**
    199175     * @ticket 27064
Note: See TracChangeset for help on using the changeset viewer.