public function testUpdateContentTypeDraftThrowsUnauthorizedException() { $contentTypeDraft = $this->createDraftContentType(); $contentTypeService = $this->repository->getContentTypeService(); $typeUpdate = $contentTypeService->newContentTypeUpdateStruct(); $typeUpdate->identifier = 'news-article'; // Set anonymous as current user $this->repository->setCurrentUser($this->getStubbedUser(10)); $contentTypeService->updateContentTypeDraft($contentTypeDraft, $typeUpdate); }