Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2433-2446 (lines=14) @@
2430
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2431
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2432
     */
2433
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2434
    {
2435
        $repository = $this->getRepository();
2436
2437
        $contentService = $repository->getContentService();
2438
2439
        /* BEGIN: Use Case */
2440
        $content = $this->createContentVersion1();
2441
2442
        // This call will fail with a "NotFoundException", because not versionNo
2443
        // 2 exists for this content object.
2444
        $contentService->loadVersionInfoById($content->id, 2);
2445
        /* END: Use Case */
2446
    }
2447
2448
    /**
2449
     * Test for the loadContentByVersionInfo() method.
@@ 2811-2824 (lines=14) @@
2808
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2809
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2810
     */
2811
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2812
    {
2813
        $repository = $this->getRepository();
2814
2815
        $contentService = $repository->getContentService();
2816
2817
        /* BEGIN: Use Case */
2818
        $content = $this->createContentVersion1();
2819
2820
        // This call will fail with a "NotFoundException", because for this
2821
        // content object no versionNo=2 exists.
2822
        $contentService->loadContent($content->id, null, 2);
2823
        /* END: Use Case */
2824
    }
2825
2826
    /**
2827
     * Test for the loadContentByRemoteId() method.