public function testUpdateFieldableEntityTypeWithoutInCodeDefinition() { $entity_type =
clone $this->entityTypeManager->
getDefinition('entity_test_update'
);
$field_storage_definitions = \Drupal::
service('entity_field.manager'
)->
getFieldStorageDefinitions('entity_test_update'
);
// Remove the entity type definition. This is the same thing as removing the
// code that defines it.
$this->
deleteEntityType();
// Rename the base table, update the fieldable entity type and check that
// the table has been renamed.
$entity_type->
set('base_table', 'entity_test_update_new'
);
$this->entityDefinitionUpdateManager->
updateFieldableEntityType($entity_type,
$field_storage_definitions);
$this->
assertTrue($this->database->
schema()->
tableExists('entity_test_update_new'
), 'The base table has been renamed.'
);
$this->
assertFalse($this->database->
schema()->
tableExists('entity_test_update'
), 'The old base table does not exist anymore.'
);
} /**
* Tests uninstalling an entity type that doesn't exist in code anymore.
*
* @covers ::uninstallEntityType
*/
public function testUninstallEntityTypeWithoutInCodeDefinition() {