Code Duplication    Length = 25-25 lines in 2 locations

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

@@ 1035-1059 (lines=25) @@
1032
        );
1033
    }
1034
1035
    public function testFindNoPerformCount()
1036
    {
1037
        $repository = $this->getRepository();
1038
        $searchService = $repository->getSearchService();
1039
1040
        $query = new Query();
1041
        $query->performCount = false;
1042
        $query->query = new Criterion\ContentTypeId(
1043
            array(4)
1044
        );
1045
1046
        $searchHit = $searchService->findContent($query);
1047
1048
        if (ltrim(get_class($this->getSetupFactory()), '\\') === 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1049
            $this->assertEquals(
1050
                null,
1051
                $searchHit->totalCount
1052
            );
1053
        } else {
1054
            $this->assertEquals(
1055
                2,
1056
                $searchHit->totalCount
1057
            );
1058
        }
1059
    }
1060
1061
    /**
1062
     * @expectedException \RuntimeException
@@ 1083-1107 (lines=25) @@
1080
        $searchService->findContent($query);
1081
    }
1082
1083
    public function testFindLocationsNoPerformCount()
1084
    {
1085
        $repository = $this->getRepository();
1086
        $searchService = $repository->getSearchService();
1087
1088
        $query = new LocationQuery();
1089
        $query->performCount = false;
1090
        $query->query = new Criterion\ContentTypeId(
1091
            array(4)
1092
        );
1093
1094
        $searchHit = $searchService->findLocations($query);
1095
1096
        if (ltrim(get_class($this->getSetupFactory()), '\\') === 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1097
            $this->assertEquals(
1098
                null,
1099
                $searchHit->totalCount
1100
            );
1101
        } else {
1102
            $this->assertEquals(
1103
                2,
1104
                $searchHit->totalCount
1105
            );
1106
        }
1107
    }
1108
1109
    /**
1110
     * @expectedException \RuntimeException