Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 2144-2157 (lines=14) @@
2141
     * @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo)
2142
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2143
     */
2144
    public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter()
2145
    {
2146
        $repository = $this->getRepository();
2147
2148
        $contentService = $repository->getContentService();
2149
2150
        /* BEGIN: Use Case */
2151
        $content = $this->createContentVersion1();
2152
2153
        // This call will fail with a "NotFoundException", because not versionNo
2154
        // 2 exists for this content object.
2155
        $contentService->loadVersionInfoById($content->id, 2);
2156
        /* END: Use Case */
2157
    }
2158
2159
    /**
2160
     * Test for the loadContentByVersionInfo() method.
@@ 2503-2516 (lines=14) @@
2500
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
2501
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter
2502
     */
2503
    public function testLoadContentThrowsNotFoundExceptionWithThirdParameter()
2504
    {
2505
        $repository = $this->getRepository();
2506
2507
        $contentService = $repository->getContentService();
2508
2509
        /* BEGIN: Use Case */
2510
        $content = $this->createContentVersion1();
2511
2512
        // This call will fail with a "NotFoundException", because for this
2513
        // content object no versionNo=2 exists.
2514
        $contentService->loadContent($content->id, null, 2);
2515
        /* END: Use Case */
2516
    }
2517
2518
    /**
2519
     * Test for the loadContentByRemoteId() method.