Code Duplication    Length = 15-19 lines in 4 locations

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

@@ 657-671 (lines=15) @@
654
        );
655
    }
656
657
    public function testObjectStateIdFilter()
658
    {
659
        $this->assertSearchResults(
660
            [5, 12, 13, 14, 15, 43, 44, 45, 48, 51],
661
            $this->getContentSearchHandler()->findLocations(
662
                new LocationQuery(
663
                    [
664
                        'filter' => new Criterion\ObjectStateId(1),
665
                        'limit' => 10,
666
                        'sortClauses' => [new SortClause\ContentId()],
667
                    ]
668
                )
669
            )
670
        );
671
    }
672
673
    public function testObjectStateIdFilterIn()
674
    {
@@ 834-852 (lines=19) @@
831
        );
832
    }
833
834
    public function testUserMetadataFilterOwnerAdministrator()
835
    {
836
        $this->assertSearchResults(
837
            [2, 5, 12, 13, 14, 15, 43, 44, 45, 48],
838
            $this->getContentSearchHandler()->findLocations(
839
                new LocationQuery(
840
                    [
841
                        'filter' => new Criterion\UserMetadata(
842
                            Criterion\UserMetadata::OWNER,
843
                            Criterion\Operator::EQ,
844
                            14
845
                        ),
846
                        'limit' => 10,
847
                        'sortClauses' => [new SortClause\Location\Id()],
848
                    ]
849
                )
850
            )
851
        );
852
    }
853
854
    public function testUserMetadataFilterOwnerEqAMember()
855
    {
@@ 998-1012 (lines=15) @@
995
        );
996
    }
997
998
    public function testLanguageCodeFilter()
999
    {
1000
        $this->assertSearchResults(
1001
            [2, 5, 12, 13, 14, 15, 43, 44, 45, 48],
1002
            $this->getContentSearchHandler()->findLocations(
1003
                new LocationQuery(
1004
                    [
1005
                        'filter' => new Criterion\LanguageCode('eng-US'),
1006
                        'limit' => 10,
1007
                        'sortClauses' => [new SortClause\Location\Id()],
1008
                    ]
1009
                )
1010
            )
1011
        );
1012
    }
1013
1014
    public function testLanguageCodeFilterIn()
1015
    {

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

@@ 1178-1196 (lines=19) @@
1175
        );
1176
    }
1177
1178
    public function testUserMetadataFilterOwnerAdministrator()
1179
    {
1180
        $this->assertSearchResults(
1181
            [4, 10, 11, 12, 13, 14, 41, 42, 45, 49],
1182
            $this->getContentSearchHandler()->findContent(
1183
                new Query(
1184
                    [
1185
                        'filter' => new Criterion\UserMetadata(
1186
                            Criterion\UserMetadata::OWNER,
1187
                            Criterion\Operator::EQ,
1188
                            14
1189
                        ),
1190
                        'limit' => 10,
1191
                        'sortClauses' => [new SortClause\ContentId()],
1192
                    ]
1193
                )
1194
            )
1195
        );
1196
    }
1197
1198
    public function testUserMetadataFilterOwnerEqAMember()
1199
    {