Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 1064-1081 (lines=18) @@
1061
    /**
1062
     * @expectedException \RuntimeException
1063
     */
1064
    public function testFindNoPerformCountException()
1065
    {
1066
        if (ltrim(get_class($this->getSetupFactory()), '\\') !== 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1067
            $this->markTestSkipped('Only applicable to Legacy/DB based search');
1068
        }
1069
1070
        $repository = $this->getRepository();
1071
        $searchService = $repository->getSearchService();
1072
1073
        $query = new Query();
1074
        $query->performCount = false;
1075
        $query->limit = 0;
1076
        $query->query = new Criterion\ContentTypeId(
1077
            array(4)
1078
        );
1079
1080
        $searchService->findContent($query);
1081
    }
1082
1083
    public function testFindLocationsNoPerformCount()
1084
    {
@@ 1112-1129 (lines=18) @@
1109
    /**
1110
     * @expectedException \RuntimeException
1111
     */
1112
    public function testFindLocationsNoPerformCountException()
1113
    {
1114
        if (ltrim(get_class($this->getSetupFactory()), '\\') !== 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1115
            $this->markTestSkipped('Only applicable to Legacy/DB based search');
1116
        }
1117
1118
        $repository = $this->getRepository();
1119
        $searchService = $repository->getSearchService();
1120
1121
        $query = new LocationQuery();
1122
        $query->performCount = false;
1123
        $query->limit = 0;
1124
        $query->query = new Criterion\ContentTypeId(
1125
            array(4)
1126
        );
1127
1128
        $searchService->findLocations($query);
1129
    }
1130
1131
    /**
1132
     * Create test Content with ezcountry field having multiple countries selected.