Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2493-2506 (lines=14) @@
2490
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2491
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2492
     */
2493
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2494
    {
2495
        $repository = $this->getRepository();
2496
2497
        $contentService = $repository->getContentService();
2498
2499
        /* BEGIN: Use Case */
2500
        $content = $this->createContentVersion1();
2501
2502
        // This call will fail with a "NotFoundException", because not versionNo
2503
        // 2 exists for this content object.
2504
        $contentService->loadVersionInfoById($content->id, 2);
2505
        /* END: Use Case */
2506
    }
2507
2508
    /**
2509
     * Test for the loadContentByVersionInfo() method.
@@ 2877-2890 (lines=14) @@
2874
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2875
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2876
     */
2877
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2878
    {
2879
        $repository = $this->getRepository();
2880
2881
        $contentService = $repository->getContentService();
2882
2883
        /* BEGIN: Use Case */
2884
        $content = $this->createContentVersion1();
2885
2886
        // This call will fail with a "NotFoundException", because for this
2887
        // content object no versionNo=2 exists.
2888
        $contentService->loadContent($content->id, null, 2);
2889
        /* END: Use Case */
2890
    }
2891
2892
    /**
2893
     * Test for the loadContentByRemoteId() method.