Code Duplication    Length = 12-12 lines in 3 locations

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

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