Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 1794-1804 (lines=11) @@
1791
     * @covers \eZ\Publish\Core\Repository\ContentService::createContentDraft
1792
     * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
1793
     */
1794
    public function testCreateContentDraftThrowsUnauthorizedException()
1795
    {
1796
        $contentService = $this->repository->getContentService();
1797
1798
        $contentInfo = $contentService->loadContentInfo(4);
1799
1800
        // Set anonymous as current user
1801
        $this->repository->setCurrentUser($this->getStubbedUser(10));
1802
1803
        $contentService->createContentDraft($contentInfo);
1804
    }
1805
1806
    /**
1807
     * Test for the loadContentDrafts() method.
@@ 1988-1998 (lines=11) @@
1985
     * @covers \eZ\Publish\Core\Repository\ContentService::loadVersions
1986
     * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
1987
     */
1988
    public function testLoadVersionsThrowsUnauthorizedException()
1989
    {
1990
        $contentService = $this->repository->getContentService();
1991
1992
        $contentInfo = $contentService->loadContentInfo(4);
1993
1994
        // Set anonymous as current user
1995
        $this->repository->setCurrentUser($this->getStubbedUser(10));
1996
1997
        $contentService->loadVersions($contentInfo);
1998
    }
1999
2000
    /**
2001
     * Test for the deleteVersion() method.