public function testCopyContentTypeThrowsUnauthorizedException() { $contentTypeService = $this->repository->getContentTypeService(); $commentType = $contentTypeService->loadContentTypeByIdentifier('comment'); // Set anonymous as current user $this->repository->setCurrentUser($this->getStubbedUser(10)); $contentTypeService->copyContentType($commentType); }