Code Duplication    Length = 14-14 lines in 2 locations

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

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