Code Duplication    Length = 14-14 lines in 2 locations

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

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