Code Duplication    Length = 14-14 lines in 2 locations

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

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