Code Duplication    Length = 14-14 lines in 3 locations

eZ/Publish/API/Repository/Tests/RoleServiceTest.php 3 locations

@@ 497-510 (lines=14) @@
494
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
495
     * @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testLoadRole
496
     */
497
    public function testLoadRoleThrowsNotFoundException()
498
    {
499
        $repository = $this->getRepository();
500
501
        $nonExistingRoleId = $this->generateId('role', self::DB_INT_MAX);
502
        /* BEGIN: Use Case */
503
504
        $roleService = $repository->getRoleService();
505
506
        // This call will fail with a NotFoundException, because no such role exists.
507
        $roleService->loadRole($nonExistingRoleId);
508
509
        /* END: Use Case */
510
    }
511
512
    /**
513
     * Test for the loadRoleDraft() method.
@@ 519-532 (lines=14) @@
516
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
517
     * @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testLoadRoleDraft
518
     */
519
    public function testLoadRoleDraftThrowsNotFoundException()
520
    {
521
        $repository = $this->getRepository();
522
523
        $nonExistingRoleId = $this->generateId('role', self::DB_INT_MAX);
524
        /* BEGIN: Use Case */
525
526
        $roleService = $repository->getRoleService();
527
528
        // This call will fail with a NotFoundException, because no such role exists.
529
        $roleService->loadRoleDraft($nonExistingRoleId);
530
531
        /* END: Use Case */
532
    }
533
534
    /**
535
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
@@ 537-550 (lines=14) @@
534
    /**
535
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
536
     */
537
    public function testLoadRoleDraftByRoleIdThrowsNotFoundException()
538
    {
539
        $repository = $this->getRepository();
540
541
        $nonExistingRoleId = $this->generateId('role', self::DB_INT_MAX);
542
        /* BEGIN: Use Case */
543
544
        $roleService = $repository->getRoleService();
545
546
        // This call will fail with a NotFoundException, because no such role exists.
547
        $roleService->loadRoleDraftByRoleId($nonExistingRoleId);
548
549
        /* END: Use Case */
550
    }
551
552
    /**
553
     * Test for the loadRoleByIdentifier() method.