Code Duplication    Length = 14-14 lines in 2 locations

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

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