Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2199-2212 (lines=14) @@
2196
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2197
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2198
     */
2199
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2200
    {
2201
        $repository = $this->getRepository();
2202
2203
        $contentService = $repository->getContentService();
2204
2205
        /* BEGIN: Use Case */
2206
        $content = $this->createContentVersion1();
2207
2208
        // This call will fail with a "NotFoundException", because not versionNo
2209
        // 2 exists for this content object.
2210
        $contentService->loadVersionInfoById($content->id, 2);
2211
        /* END: Use Case */
2212
    }
2213
2214
    /**
2215
     * Test for the loadContentByVersionInfo() method.
@@ 2558-2571 (lines=14) @@
2555
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2556
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2557
     */
2558
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2559
    {
2560
        $repository = $this->getRepository();
2561
2562
        $contentService = $repository->getContentService();
2563
2564
        /* BEGIN: Use Case */
2565
        $content = $this->createContentVersion1();
2566
2567
        // This call will fail with a "NotFoundException", because for this
2568
        // content object no versionNo=2 exists.
2569
        $contentService->loadContent($content->id, null, 2);
2570
        /* END: Use Case */
2571
    }
2572
2573
    /**
2574
     * Test for the loadContentByRemoteId() method.