Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2601-2614 (lines=14) @@
2598
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2599
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2600
     */
2601
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2602
    {
2603
        $repository = $this->getRepository();
2604
2605
        $contentService = $repository->getContentService();
2606
2607
        /* BEGIN: Use Case */
2608
        $content = $this->createContentVersion1();
2609
2610
        // This call will fail with a "NotFoundException", because not versionNo
2611
        // 2 exists for this content object.
2612
        $contentService->loadVersionInfoById($content->id, 2);
2613
        /* END: Use Case */
2614
    }
2615
2616
    /**
2617
     * Test for the loadContentByVersionInfo() method.
@@ 2985-2998 (lines=14) @@
2982
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2983
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2984
     */
2985
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2986
    {
2987
        $repository = $this->getRepository();
2988
2989
        $contentService = $repository->getContentService();
2990
2991
        /* BEGIN: Use Case */
2992
        $content = $this->createContentVersion1();
2993
2994
        // This call will fail with a "NotFoundException", because for this
2995
        // content object no versionNo=2 exists.
2996
        $contentService->loadContent($content->id, null, 2);
2997
        /* END: Use Case */
2998
    }
2999
3000
    /**
3001
     * Test for the loadContentByRemoteId() method.