Code Duplication    Length = 12-12 lines in 3 locations

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

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