Code Duplication    Length = 12-12 lines in 3 locations

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

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