public function testAssignContentTypeGroupThrowsUnauthorizedException() { $contentTypeService = $this->repository->getContentTypeService(); $mediaGroup = $contentTypeService->loadContentTypeGroupByIdentifier('Media'); $folderType = $contentTypeService->loadContentTypeByIdentifier('folder'); // Set anonymous as current user $this->repository->setCurrentUser($this->getStubbedUser(10)); $contentTypeService->assignContentTypeGroup($folderType, $mediaGroup); }