Code Duplication    Length = 14-14 lines in 2 locations

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

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