eZ\Publish\Core\Repository\Tests\Service\Integration\ContentTypeBase::testPublishContentTypeDraftThrowsUnauthorizedException PHP Method

testPublishContentTypeDraftThrowsUnauthorizedException() public method

Test for the publishContentTypeDraft() method.
    public function testPublishContentTypeDraftThrowsUnauthorizedException()
    {
        $contentTypeDraft = $this->createDraftContentType();
        $draftId = $contentTypeDraft->id;
        $contentTypeService = $this->repository->getContentTypeService();
        $contentTypeDraft = $contentTypeService->loadContentTypeDraft($draftId);
        // Set anonymous as current user
        $this->repository->setCurrentUser($this->getStubbedUser(10));
        $contentTypeService->publishContentTypeDraft($contentTypeDraft);
    }
ContentTypeBase