Code Duplication    Length = 18-18 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceLocationTest.php 1 location

@@ 148-165 (lines=18) @@
145
    /**
146
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
147
     */
148
    public function testInvalidFieldIdentifierRange()
149
    {
150
        $repository = $this->getRepository();
151
        $searchService = $repository->getSearchService();
152
153
        $searchService->findLocations(
154
            new LocationQuery(
155
                array(
156
                    'filter' => new Criterion\Field(
157
                        'some_hopefully_unknown_field',
158
                        Criterion\Operator::BETWEEN,
159
                        array(10, 1000)
160
                    ),
161
                    'sortClauses' => array(new SortClause\ContentId()),
162
                )
163
            )
164
        );
165
    }
166
167
    /**
168
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 1 location

@@ 1307-1324 (lines=18) @@
1304
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
1305
     * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field'
1306
     */
1307
    public function testInvalidFieldIdentifierRange()
1308
    {
1309
        $repository = $this->getRepository();
1310
        $searchService = $repository->getSearchService();
1311
1312
        $searchService->findContent(
1313
            new Query(
1314
                array(
1315
                    'filter' => new Criterion\Field(
1316
                        'some_hopefully_unknown_field',
1317
                        Criterion\Operator::BETWEEN,
1318
                        array(10, 1000)
1319
                    ),
1320
                    'sortClauses' => array(new SortClause\ContentId()),
1321
                )
1322
            )
1323
        );
1324
    }
1325
1326
    /**
1327
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException