Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2594-2607 (lines=14) @@
2591
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2592
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2593
     */
2594
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2595
    {
2596
        $repository = $this->getRepository();
2597
2598
        $contentService = $repository->getContentService();
2599
2600
        /* BEGIN: Use Case */
2601
        $content = $this->createContentVersion1();
2602
2603
        // This call will fail with a "NotFoundException", because not versionNo
2604
        // 2 exists for this content object.
2605
        $contentService->loadVersionInfoById($content->id, 2);
2606
        /* END: Use Case */
2607
    }
2608
2609
    /**
2610
     * Test for the loadContentByVersionInfo() method.
@@ 2978-2991 (lines=14) @@
2975
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2976
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2977
     */
2978
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2979
    {
2980
        $repository = $this->getRepository();
2981
2982
        $contentService = $repository->getContentService();
2983
2984
        /* BEGIN: Use Case */
2985
        $content = $this->createContentVersion1();
2986
2987
        // This call will fail with a "NotFoundException", because for this
2988
        // content object no versionNo=2 exists.
2989
        $contentService->loadContent($content->id, null, 2);
2990
        /* END: Use Case */
2991
    }
2992
2993
    /**
2994
     * Test for the loadContentByRemoteId() method.