Code Duplication    Length = 12-12 lines in 3 locations

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

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