Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2152-2165 (lines=14) @@
2149
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2150
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2151
     */
2152
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2153
    {
2154
        $repository = $this->getRepository();
2155
2156
        $contentService = $repository->getContentService();
2157
2158
        /* BEGIN: Use Case */
2159
        $content = $this->createContentVersion1();
2160
2161
        // This call will fail with a "NotFoundException", because not versionNo
2162
        // 2 exists for this content object.
2163
        $contentService->loadVersionInfoById($content->id, 2);
2164
        /* END: Use Case */
2165
    }
2166
2167
    /**
2168
     * Test for the loadContentByVersionInfo() method.
@@ 2511-2524 (lines=14) @@
2508
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2509
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2510
     */
2511
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2512
    {
2513
        $repository = $this->getRepository();
2514
2515
        $contentService = $repository->getContentService();
2516
2517
        /* BEGIN: Use Case */
2518
        $content = $this->createContentVersion1();
2519
2520
        // This call will fail with a "NotFoundException", because for this
2521
        // content object no versionNo=2 exists.
2522
        $contentService->loadContent($content->id, null, 2);
2523
        /* END: Use Case */
2524
    }
2525
2526
    /**
2527
     * Test for the loadContentByRemoteId() method.