Code Duplication    Length = 14-14 lines in 2 locations

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

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