Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 444-459 (lines=16) @@
441
     *
442
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
443
     */
444
    public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException()
445
    {
446
        $this->expectException(\eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue::class);
447
448
        $query = new URLQuery();
449
        $query->filter = new Criterion\MatchAll();
450
        $query->offset = 'invalid!';
451
452
        $repository = $this->getRepository();
453
454
        /* BEGIN: Use Case */
455
        $urlService = $repository->getURLService();
456
        // This call will fail with a InvalidArgumentException
457
        $urlService->findUrls($query);
458
        /* END: Use Case */
459
    }
460
461
    /**
462
     * Test for URLService::findUrls() method.
@@ 466-481 (lines=16) @@
463
     *
464
     * @see \eZ\Publish\Core\Repository\URLService::findUrls()
465
     */
466
    public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException()
467
    {
468
        $this->expectException(\eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue::class);
469
470
        $query = new URLQuery();
471
        $query->filter = new Criterion\MatchAll();
472
        $query->limit = 'invalid!';
473
474
        $repository = $this->getRepository();
475
476
        /* BEGIN: Use Case */
477
        $urlService = $repository->getURLService();
478
        // This call will fail with a InvalidArgumentException
479
        $urlService->findUrls($query);
480
        /* END: Use Case */
481
    }
482
483
    /**
484
     * Test for URLService::findUrls() method.