Code Duplication    Length = 14-14 lines in 2 locations

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

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