Code Duplication    Length = 12-12 lines in 3 locations

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

@@ 561-572 (lines=12) @@
558
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
559
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfo
560
     */
561
    public function testLoadContentInfoThrowsNotFoundException()
562
    {
563
        $repository = $this->getRepository();
564
565
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
566
        /* BEGIN: Use Case */
567
        $contentService = $repository->getContentService();
568
569
        // This call will fail with a NotFoundException
570
        $contentService->loadContentInfo($nonExistentContentId);
571
        /* END: Use Case */
572
    }
573
574
    /**
575
     * Test for the loadContentInfoList() method.
@@ 780-791 (lines=12) @@
777
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
778
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadVersionInfoById
779
     */
780
    public function testLoadVersionInfoByIdThrowsNotFoundException()
781
    {
782
        $repository = $this->getRepository();
783
784
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
785
        /* BEGIN: Use Case */
786
        $contentService = $repository->getContentService();
787
788
        // This call will fail with a "NotFoundException"
789
        $contentService->loadVersionInfoById($nonExistentContentId);
790
        /* END: Use Case */
791
    }
792
793
    /**
794
     * Test for the loadContentByContentInfo() method.
@@ 888-899 (lines=12) @@
885
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
886
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContent
887
     */
888
    public function testLoadContentThrowsNotFoundException()
889
    {
890
        $repository = $this->getRepository();
891
892
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
893
        /* BEGIN: Use Case */
894
        $contentService = $repository->getContentService();
895
896
        // This call will fail with a "NotFoundException"
897
        $contentService->loadContent($nonExistentContentId);
898
        /* END: Use Case */
899
    }
900
901
    /**
902
     * Data provider for testLoadContentByRemoteId().