public function testModifyingTranslatableColumnSchema() { $this->
installModule('entity_schema_test'
);
$this->
updateEntityType(TRUE
);
$fields =
['revision_log', 'uuid'
];
$entity_field_manager = \Drupal::
service('entity_field.manager'
);
foreach ($fields as $field_name) { $original_definition =
$entity_field_manager->
getBaseFieldDefinitions('entity_test_update'
)[$field_name];
$new_definition =
clone $original_definition;
$new_definition->
setLabel($original_definition->
getLabel() . ', the other one'
);
$this->
assertTrue($this->entityTypeManager->
getStorage('entity_test_update'
) ->
requiresFieldDataMigration($new_definition,
$original_definition));
} } /**
* Tests fields from an uninstalled module are removed from the schema.
*/
public function testCleanUpStorageDefinition() { // Find all the entity types provided by the entity_test module and install
// the schema for them.
$entity_type_ids =
[];
$entities = \Drupal::
entityTypeManager()->
getDefinitions();