Code Duplication    Length = 9-12 lines in 3 locations

tests/phpunit/tests/comment/query.php 3 locations

@@ 1020-1031 (lines=12) @@
1017
    /**
1018
     * @ticket 29189
1019
     */
1020
    function test_fields_comment__in() 
1021
    {
1022
        $comment_1 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1' ));
1023
        $comment_2 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1' ));
1024
        $comment_3 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1' ));
1025
1026
        $comment_ids = get_comments(
1027
            array(
1028
            'fields' => 'ids',
1029
            'comment__in' => array( $comment_1, $comment_3 ),
1030
            ) 
1031
        );
1032
1033
        $this->assertEqualSets(array( $comment_1, $comment_3 ), $comment_ids);
1034
    }
@@ 1039-1050 (lines=12) @@
1036
    /**
1037
     * @ticket 29189
1038
     */
1039
    function test_fields_comment__not_in() 
1040
    {
1041
        $comment_1 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1' ));
1042
        $comment_2 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1' ));
1043
        $comment_3 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1' ));
1044
1045
        $comment_ids = get_comments(
1046
            array(
1047
            'fields' => 'ids',
1048
            'comment__not_in' => array( $comment_2, $comment_3 ),
1049
            ) 
1050
        );
1051
1052
        $this->assertEqualSets(array( $comment_1 ), $comment_ids);
1053
    }
@@ 1206-1214 (lines=9) @@
1203
    /**
1204
     * @ticket 19623
1205
     */
1206
    public function test_get_comments_with_status_all() 
1207
    {
1208
        $comment_1 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1' ));
1209
        $comment_2 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1' ));
1210
        $comment_3 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '0' ));
1211
        $comments_approved_1 = get_comments(array( 'status' => 'all' ));
1212
1213
        $comment_ids = get_comments(array( 'fields' => 'ids' ));
1214
        $this->assertEqualSets(array( $comment_1, $comment_2, $comment_3 ), $comment_ids);
1215
    }
1216
1217
    /**