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

testUnassignContentTypeGroupThrowsUnauthorizedException() public method

Test for the unassignContentTypeGroup() method.
    public function testUnassignContentTypeGroupThrowsUnauthorizedException()
    {
        $contentTypeService = $this->repository->getContentTypeService();
        $folderType = $contentTypeService->loadContentTypeByIdentifier('folder');
        $mediaGroup = $contentTypeService->loadContentTypeGroupByIdentifier('Media');
        $contentGroup = $contentTypeService->loadContentTypeGroupByIdentifier('Content');
        // May not unassign last group
        $contentTypeService->assignContentTypeGroup($folderType, $mediaGroup);
        // Set anonymous as current user
        $this->repository->setCurrentUser($this->getStubbedUser(10));
        $contentTypeService->unassignContentTypeGroup($folderType, $contentGroup);
    }
ContentTypeBase