Code Duplication    Length = 14-14 lines in 2 locations

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

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