Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 313-326 (lines=14) @@
310
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
311
     * @expectedException \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue
312
     */
313
    public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException()
314
    {
315
        $query = new URLQuery();
316
        $query->filter = new Criterion\MatchAll();
317
        $query->offset = 'invalid!';
318
319
        $repository = $this->getRepository();
320
321
        /* BEGIN: Use Case */
322
        $urlService = $repository->getURLService();
323
        // This call will fail with a InvalidArgumentException
324
        $urlService->findUrls($query);
325
        /* END: Use Case */
326
    }
327
328
    /**
329
     * Test for URLService::findUrls() method.
@@ 334-347 (lines=14) @@
331
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
332
     * @expectedException \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue
333
     */
334
    public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException()
335
    {
336
        $query = new URLQuery();
337
        $query->filter = new Criterion\MatchAll();
338
        $query->limit = 'invalid!';
339
340
        $repository = $this->getRepository();
341
342
        /* BEGIN: Use Case */
343
        $urlService = $repository->getURLService();
344
        // This call will fail with a InvalidArgumentException
345
        $urlService->findUrls($query);
346
        /* END: Use Case */
347
    }
348
349
    /**
350
     * Test for URLService::findUrls() method.