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

testRemoveFieldDefinitionThrowsUnauthorizedException() public method

Test for the removeFieldDefinition() method.
    public function testRemoveFieldDefinitionThrowsUnauthorizedException()
    {
        $contentTypeDraft = $this->createDraftContentType();
        $bodyField = $contentTypeDraft->getFieldDefinition('body');
        // Set anonymous as current user
        $this->repository->setCurrentUser($this->getStubbedUser(10));
        $this->repository->getContentTypeService()->removeFieldDefinition($contentTypeDraft, $bodyField);
    }
ContentTypeBase