Code Duplication    Length = 14-14 lines in 2 locations

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

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