Code Duplication    Length = 12-12 lines in 3 locations

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

@@ 528-539 (lines=12) @@
525
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
526
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfo
527
     */
528
    public function testLoadContentInfoThrowsNotFoundException()
529
    {
530
        $repository = $this->getRepository();
531
532
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
533
        /* BEGIN: Use Case */
534
        $contentService = $repository->getContentService();
535
536
        // This call will fail with a NotFoundException
537
        $contentService->loadContentInfo($nonExistentContentId);
538
        /* END: Use Case */
539
    }
540
541
    /**
542
     * Test for the loadContentInfoByRemoteId() method.
@@ 706-717 (lines=12) @@
703
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
704
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadVersionInfoById
705
     */
706
    public function testLoadVersionInfoByIdThrowsNotFoundException()
707
    {
708
        $repository = $this->getRepository();
709
710
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
711
        /* BEGIN: Use Case */
712
        $contentService = $repository->getContentService();
713
714
        // This call will fail with a "NotFoundException"
715
        $contentService->loadVersionInfoById($nonExistentContentId);
716
        /* END: Use Case */
717
    }
718
719
    /**
720
     * Test for the loadContentByContentInfo() method.
@@ 814-825 (lines=12) @@
811
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
812
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContent
813
     */
814
    public function testLoadContentThrowsNotFoundException()
815
    {
816
        $repository = $this->getRepository();
817
818
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
819
        /* BEGIN: Use Case */
820
        $contentService = $repository->getContentService();
821
822
        // This call will fail with a "NotFoundException"
823
        $contentService->loadContent($nonExistentContentId);
824
        /* END: Use Case */
825
    }
826
827
    /**
828
     * Data provider for testLoadContentByRemoteId().