Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2408-2421 (lines=14) @@
2405
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2406
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2407
     */
2408
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2409
    {
2410
        $repository = $this->getRepository();
2411
2412
        $contentService = $repository->getContentService();
2413
2414
        /* BEGIN: Use Case */
2415
        $content = $this->createContentVersion1();
2416
2417
        // This call will fail with a "NotFoundException", because not versionNo
2418
        // 2 exists for this content object.
2419
        $contentService->loadVersionInfoById($content->id, 2);
2420
        /* END: Use Case */
2421
    }
2422
2423
    /**
2424
     * Test for the loadContentByVersionInfo() method.
@@ 2786-2799 (lines=14) @@
2783
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2784
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2785
     */
2786
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2787
    {
2788
        $repository = $this->getRepository();
2789
2790
        $contentService = $repository->getContentService();
2791
2792
        /* BEGIN: Use Case */
2793
        $content = $this->createContentVersion1();
2794
2795
        // This call will fail with a "NotFoundException", because for this
2796
        // content object no versionNo=2 exists.
2797
        $contentService->loadContent($content->id, null, 2);
2798
        /* END: Use Case */
2799
    }
2800
2801
    /**
2802
     * Test for the loadContentByRemoteId() method.