Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2079-2092 (lines=14) @@
2076
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2077
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2078
     */
2079
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2080
    {
2081
        $repository = $this->getRepository();
2082
2083
        $contentService = $repository->getContentService();
2084
2085
        /* BEGIN: Use Case */
2086
        $content = $this->createContentVersion1();
2087
2088
        // This call will fail with a "NotFoundException", because not versionNo
2089
        // 2 exists for this content object.
2090
        $contentService->loadVersionInfoById($content->id, 2);
2091
        /* END: Use Case */
2092
    }
2093
2094
    /**
2095
     * Test for the loadContentByVersionInfo() method.
@@ 2438-2451 (lines=14) @@
2435
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2436
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2437
     */
2438
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2439
    {
2440
        $repository = $this->getRepository();
2441
2442
        $contentService = $repository->getContentService();
2443
2444
        /* BEGIN: Use Case */
2445
        $content = $this->createContentVersion1();
2446
2447
        // This call will fail with a "NotFoundException", because for this
2448
        // content object no versionNo=2 exists.
2449
        $contentService->loadContent($content->id, null, 2);
2450
        /* END: Use Case */
2451
    }
2452
2453
    /**
2454
     * Test for the loadContentByRemoteId() method.