Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 466-479 (lines=14) @@
463
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
464
     * @expectedException \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue
465
     */
466
    public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException()
467
    {
468
        $query = new URLQuery();
469
        $query->filter = new Criterion\MatchAll();
470
        $query->offset = 'invalid!';
471
472
        $repository = $this->getRepository();
473
474
        /* BEGIN: Use Case */
475
        $urlService = $repository->getURLService();
476
        // This call will fail with a InvalidArgumentException
477
        $urlService->findUrls($query);
478
        /* END: Use Case */
479
    }
480
481
    /**
482
     * Test for URLService::findUrls() method.
@@ 487-500 (lines=14) @@
484
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
485
     * @expectedException \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue
486
     */
487
    public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException()
488
    {
489
        $query = new URLQuery();
490
        $query->filter = new Criterion\MatchAll();
491
        $query->limit = 'invalid!';
492
493
        $repository = $this->getRepository();
494
495
        /* BEGIN: Use Case */
496
        $urlService = $repository->getURLService();
497
        // This call will fail with a InvalidArgumentException
498
        $urlService->findUrls($query);
499
        /* END: Use Case */
500
    }
501
502
    /**
503
     * Test for URLService::findUrls() method.