Code Duplication    Length = 15-19 lines in 4 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 1 location

@@ 1262-1280 (lines=19) @@
1259
        );
1260
    }
1261
1262
    public function testUserMetadataFilterOwnerAdministrator()
1263
    {
1264
        $this->assertSearchResults(
1265
            array(4, 10, 11, 12, 13, 14, 41, 42, 45, 49),
1266
            $this->getContentSearchHandler()->findContent(
1267
                new Query(
1268
                    array(
1269
                        'filter' => new Criterion\UserMetadata(
1270
                            Criterion\UserMetadata::OWNER,
1271
                            Criterion\Operator::EQ,
1272
                            14
1273
                        ),
1274
                        'limit' => 10,
1275
                        'sortClauses' => array(new SortClause\ContentId()),
1276
                    )
1277
                )
1278
            )
1279
        );
1280
    }
1281
1282
    public function testUserMetadataFilterOwnerEqAMember()
1283
    {

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 3 locations

@@ 740-754 (lines=15) @@
737
        );
738
    }
739
740
    public function testObjectStateIdFilter()
741
    {
742
        $this->assertSearchResults(
743
            array(5, 12, 13, 14, 15, 43, 44, 45, 48, 51),
744
            $this->getContentSearchHandler()->findLocations(
745
                new LocationQuery(
746
                    array(
747
                        'filter' => new Criterion\ObjectStateId(1),
748
                        'limit' => 10,
749
                        'sortClauses' => array(new SortClause\ContentId()),
750
                    )
751
                )
752
            )
753
        );
754
    }
755
756
    public function testObjectStateIdFilterIn()
757
    {
@@ 917-935 (lines=19) @@
914
        );
915
    }
916
917
    public function testUserMetadataFilterOwnerAdministrator()
918
    {
919
        $this->assertSearchResults(
920
            array(2, 5, 12, 13, 14, 15, 43, 44, 45, 48),
921
            $this->getContentSearchHandler()->findLocations(
922
                new LocationQuery(
923
                    array(
924
                        'filter' => new Criterion\UserMetadata(
925
                            Criterion\UserMetadata::OWNER,
926
                            Criterion\Operator::EQ,
927
                            14
928
                        ),
929
                        'limit' => 10,
930
                        'sortClauses' => array(new SortClause\Location\Id()),
931
                    )
932
                )
933
            )
934
        );
935
    }
936
937
    public function testUserMetadataFilterOwnerEqAMember()
938
    {
@@ 1081-1095 (lines=15) @@
1078
        );
1079
    }
1080
1081
    public function testLanguageCodeFilter()
1082
    {
1083
        $this->assertSearchResults(
1084
            array(2, 5, 12, 13, 14, 15, 43, 44, 45, 48),
1085
            $this->getContentSearchHandler()->findLocations(
1086
                new LocationQuery(
1087
                    array(
1088
                        'filter' => new Criterion\LanguageCode('eng-US'),
1089
                        'limit' => 10,
1090
                        'sortClauses' => array(new SortClause\Location\Id()),
1091
                    )
1092
                )
1093
            )
1094
        );
1095
    }
1096
1097
    public function testLanguageCodeFilterIn()
1098
    {