public function testRemoveFieldDefinition()
{
$contentTypeDraft = $this->createDraftContentType();
$draftId = $contentTypeDraft->id;
/* BEGIN: Use Case */
// $draftId contains the ID of a content type draft
$contentTypeService = $this->repository->getContentTypeService();
$contentTypeDraft = $contentTypeService->loadContentTypeDraft($draftId);
$bodyField = $contentTypeDraft->getFieldDefinition('body');
$contentTypeService->removeFieldDefinition($contentTypeDraft, $bodyField);
/* END: Use Case */
$loadedType = $contentTypeService->loadContentTypeDraft($contentTypeDraft->id);
$this->assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\ContentType\\ContentTypeDraft', $loadedType);
return array('removedFieldDefinition' => $bodyField, 'loadedType' => $loadedType);
}