Code Duplication    Length = 12-12 lines in 3 locations

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

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