public function testCreateContentTypeGroupThrowsUnauthorizedException() { $contentTypeService = $this->repository->getContentTypeService(); $groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('new-group'); $groupCreate->creatorId = $this->repository->getCurrentUserReference()->getUserId(); $groupCreate->creationDate = new \DateTime(); // @todo uncomment when support for multilingual names and descriptions is added EZP-24776 // $groupCreate->mainLanguageCode = 'eng-GB'; // $groupCreate->names = array( 'eng-US' => 'A name.' ); // $groupCreate->descriptions = array( 'eng-US' => 'A description.' ); // Set anonymous as current user $this->repository->setCurrentUser($this->getStubbedUser(10)); $contentTypeService->createContentTypeGroup($groupCreate); }