Code Duplication    Length = 15-19 lines in 4 locations

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

@@ 1252-1270 (lines=19) @@
1249
        );
1250
    }
1251
1252
    public function testUserMetadataFilterOwnerAdministrator()
1253
    {
1254
        $this->assertSearchResults(
1255
            array(4, 10, 11, 12, 13, 14, 41, 42, 45, 49),
1256
            $this->getContentSearchHandler()->findContent(
1257
                new Query(
1258
                    array(
1259
                        'filter' => new Criterion\UserMetadata(
1260
                            Criterion\UserMetadata::OWNER,
1261
                            Criterion\Operator::EQ,
1262
                            14
1263
                        ),
1264
                        'limit' => 10,
1265
                        'sortClauses' => array(new SortClause\ContentId()),
1266
                    )
1267
                )
1268
            )
1269
        );
1270
    }
1271
1272
    public function testUserMetadataFilterOwnerEqAMember()
1273
    {

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

@@ 730-744 (lines=15) @@
727
        );
728
    }
729
730
    public function testObjectStateIdFilter()
731
    {
732
        $this->assertSearchResults(
733
            array(5, 12, 13, 14, 15, 43, 44, 45, 48, 51),
734
            $this->getContentSearchHandler()->findLocations(
735
                new LocationQuery(
736
                    array(
737
                        'filter' => new Criterion\ObjectStateId(1),
738
                        'limit' => 10,
739
                        'sortClauses' => array(new SortClause\ContentId()),
740
                    )
741
                )
742
            )
743
        );
744
    }
745
746
    public function testObjectStateIdFilterIn()
747
    {
@@ 907-925 (lines=19) @@
904
        );
905
    }
906
907
    public function testUserMetadataFilterOwnerAdministrator()
908
    {
909
        $this->assertSearchResults(
910
            array(2, 5, 12, 13, 14, 15, 43, 44, 45, 48),
911
            $this->getContentSearchHandler()->findLocations(
912
                new LocationQuery(
913
                    array(
914
                        'filter' => new Criterion\UserMetadata(
915
                            Criterion\UserMetadata::OWNER,
916
                            Criterion\Operator::EQ,
917
                            14
918
                        ),
919
                        'limit' => 10,
920
                        'sortClauses' => array(new SortClause\Location\Id()),
921
                    )
922
                )
923
            )
924
        );
925
    }
926
927
    public function testUserMetadataFilterOwnerEqAMember()
928
    {
@@ 1071-1085 (lines=15) @@
1068
        );
1069
    }
1070
1071
    public function testLanguageCodeFilter()
1072
    {
1073
        $this->assertSearchResults(
1074
            array(2, 5, 12, 13, 14, 15, 43, 44, 45, 48),
1075
            $this->getContentSearchHandler()->findLocations(
1076
                new LocationQuery(
1077
                    array(
1078
                        'filter' => new Criterion\LanguageCode('eng-US'),
1079
                        'limit' => 10,
1080
                        'sortClauses' => array(new SortClause\Location\Id()),
1081
                    )
1082
                )
1083
            )
1084
        );
1085
    }
1086
1087
    public function testLanguageCodeFilterIn()
1088
    {