Code Duplication    Length = 9-11 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Integration/ContentBase.php 2 locations

@@ 450-460 (lines=11) @@
447
     * @covers \eZ\Publish\Core\Repository\ContentService::loadContent
448
     * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
449
     */
450
    public function testLoadContentWithVersionThrowsUnauthorizedException()
451
    {
452
        list($draft) = $this->createTestContent();
453
        $this->repository->setCurrentUser($this->getStubbedUser(10));
454
455
        $this->repository->getContentService()->loadContent(
456
            $draft->id,
457
            null,
458
            $draft->versionInfo->versionNo
459
        );
460
    }
461
462
    /**
463
     * Test for the loadContent() method.
@@ 1602-1610 (lines=9) @@
1599
     * @covers \eZ\Publish\Core\Repository\ContentService::publishVersion
1600
     * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
1601
     */
1602
    public function testPublishVersionThrowsUnauthorizedException()
1603
    {
1604
        list($draftContent, $contentType) = $this->createTestContent();
1605
1606
        // Set anonymous as current user
1607
        $this->repository->setCurrentUser($this->getStubbedUser(10));
1608
1609
        $this->repository->getContentService()->publishVersion($draftContent->versionInfo);
1610
    }
1611
1612
    /**
1613
     * Test for the createContentDraft() method.