Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 163-180 (lines=18) @@
160
    /**
161
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
162
     */
163
    public function testInvalidFieldIdentifierRange()
164
    {
165
        $repository = $this->getRepository();
166
        $searchService = $repository->getSearchService();
167
168
        $searchService->findLocations(
169
            new LocationQuery(
170
                array(
171
                    'filter' => new Criterion\Field(
172
                        'some_hopefully_unknown_field',
173
                        Criterion\Operator::BETWEEN,
174
                        array(10, 1000)
175
                    ),
176
                    'sortClauses' => array(new SortClause\ContentId()),
177
                )
178
            )
179
        );
180
    }
181
182
    /**
183
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

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

@@ 1241-1258 (lines=18) @@
1238
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
1239
     * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field'
1240
     */
1241
    public function testInvalidFieldIdentifierRange()
1242
    {
1243
        $repository = $this->getRepository();
1244
        $searchService = $repository->getSearchService();
1245
1246
        $searchService->findContent(
1247
            new Query(
1248
                array(
1249
                    'filter' => new Criterion\Field(
1250
                        'some_hopefully_unknown_field',
1251
                        Criterion\Operator::BETWEEN,
1252
                        array(10, 1000)
1253
                    ),
1254
                    'sortClauses' => array(new SortClause\ContentId()),
1255
                )
1256
            )
1257
        );
1258
    }
1259
1260
    /**
1261
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException