Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2586-2599 (lines=14) @@
2583
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2584
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2585
     */
2586
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2587
    {
2588
        $repository = $this->getRepository();
2589
2590
        $contentService = $repository->getContentService();
2591
2592
        /* BEGIN: Use Case */
2593
        $content = $this->createContentVersion1();
2594
2595
        // This call will fail with a "NotFoundException", because not versionNo
2596
        // 2 exists for this content object.
2597
        $contentService->loadVersionInfoById($content->id, 2);
2598
        /* END: Use Case */
2599
    }
2600
2601
    /**
2602
     * Test for the loadContentByVersionInfo() method.
@@ 2970-2983 (lines=14) @@
2967
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2968
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2969
     */
2970
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2971
    {
2972
        $repository = $this->getRepository();
2973
2974
        $contentService = $repository->getContentService();
2975
2976
        /* BEGIN: Use Case */
2977
        $content = $this->createContentVersion1();
2978
2979
        // This call will fail with a "NotFoundException", because for this
2980
        // content object no versionNo=2 exists.
2981
        $contentService->loadContent($content->id, null, 2);
2982
        /* END: Use Case */
2983
    }
2984
2985
    /**
2986
     * Test for the loadContentByRemoteId() method.