Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 1048-1065 (lines=18) @@
1045
    /**
1046
     * @expectedException \RuntimeException
1047
     */
1048
    public function testFindNoPerformCountException()
1049
    {
1050
        if (ltrim(get_class($this->getSetupFactory()), '\\') !== 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1051
            $this->markTestSkipped('Only applicable to Legacy/DB based search');
1052
        }
1053
1054
        $repository = $this->getRepository();
1055
        $searchService = $repository->getSearchService();
1056
1057
        $query = new Query();
1058
        $query->performCount = false;
1059
        $query->limit = 0;
1060
        $query->query = new Criterion\ContentTypeId(
1061
            array(4)
1062
        );
1063
1064
        $searchService->findContent($query);
1065
    }
1066
1067
    public function testFindLocationsNoPerformCount()
1068
    {
@@ 1096-1113 (lines=18) @@
1093
    /**
1094
     * @expectedException \RuntimeException
1095
     */
1096
    public function testFindLocationsNoPerformCountException()
1097
    {
1098
        if (ltrim(get_class($this->getSetupFactory()), '\\') !== 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy') {
1099
            $this->markTestSkipped('Only applicable to Legacy/DB based search');
1100
        }
1101
1102
        $repository = $this->getRepository();
1103
        $searchService = $repository->getSearchService();
1104
1105
        $query = new LocationQuery();
1106
        $query->performCount = false;
1107
        $query->limit = 0;
1108
        $query->query = new Criterion\ContentTypeId(
1109
            array(4)
1110
        );
1111
1112
        $searchService->findLocations($query);
1113
    }
1114
1115
    /**
1116
     * Create test Content with ezcountry field having multiple countries selected.