Code Duplication    Length = 25-25 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 2 locations

@@ 1017-1041 (lines=25) @@
1014
        );
1015
    }
1016
1017
    public function testFindNoPerformCount()
1018
    {
1019
        $repository = $this->getRepository();
1020
        $searchService = $repository->getSearchService();
1021
1022
        $query = new Query();
1023
        $query->performCount = false;
1024
        $query->query = new Criterion\ContentTypeId(
1025
            array(4)
1026
        );
1027
1028
        $searchHit = $searchService->findContent($query);
1029
1030
        if (ltrim(get_class($this->getSetupFactory()), '\\') === 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1031
            $this->assertEquals(
1032
                null,
1033
                $searchHit->totalCount
1034
            );
1035
        } else {
1036
            $this->assertEquals(
1037
                2,
1038
                $searchHit->totalCount
1039
            );
1040
        }
1041
    }
1042
1043
    /**
1044
     * @expectedException \RuntimeException
@@ 1065-1089 (lines=25) @@
1062
        $searchService->findContent($query);
1063
    }
1064
1065
    public function testFindLocationsNoPerformCount()
1066
    {
1067
        $repository = $this->getRepository();
1068
        $searchService = $repository->getSearchService();
1069
1070
        $query = new LocationQuery();
1071
        $query->performCount = false;
1072
        $query->query = new Criterion\ContentTypeId(
1073
            array(4)
1074
        );
1075
1076
        $searchHit = $searchService->findLocations($query);
1077
1078
        if (ltrim(get_class($this->getSetupFactory()), '\\') === 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1079
            $this->assertEquals(
1080
                null,
1081
                $searchHit->totalCount
1082
            );
1083
        } else {
1084
            $this->assertEquals(
1085
                2,
1086
                $searchHit->totalCount
1087
            );
1088
        }
1089
    }
1090
1091
    /**
1092
     * @expectedException \RuntimeException