Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2441-2454 (lines=14) @@
2438
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2439
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2440
     */
2441
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2442
    {
2443
        $repository = $this->getRepository();
2444
2445
        $contentService = $repository->getContentService();
2446
2447
        /* BEGIN: Use Case */
2448
        $content = $this->createContentVersion1();
2449
2450
        // This call will fail with a "NotFoundException", because not versionNo
2451
        // 2 exists for this content object.
2452
        $contentService->loadVersionInfoById($content->id, 2);
2453
        /* END: Use Case */
2454
    }
2455
2456
    /**
2457
     * Test for the loadContentByVersionInfo() method.
@@ 2825-2838 (lines=14) @@
2822
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2823
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2824
     */
2825
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2826
    {
2827
        $repository = $this->getRepository();
2828
2829
        $contentService = $repository->getContentService();
2830
2831
        /* BEGIN: Use Case */
2832
        $content = $this->createContentVersion1();
2833
2834
        // This call will fail with a "NotFoundException", because for this
2835
        // content object no versionNo=2 exists.
2836
        $contentService->loadContent($content->id, null, 2);
2837
        /* END: Use Case */
2838
    }
2839
2840
    /**
2841
     * Test for the loadContentByRemoteId() method.