$expected[$entity_type->
getRevisionTable()] =
[$revision_key];
} if ($entity_type->
isTranslatable()) { $expected[$entity_type->
getDataTable()] =
[$id_key,
$langcode_key];
} if ($entity_type->
isRevisionable() &&
$entity_type->
isTranslatable()) { $expected[$entity_type->
getRevisionDataTable()] =
[$revision_key,
$langcode_key];
} // First, test explicitly deleting and re-installing a field. Make sure that
// all primary keys are there to start with.
$this->
assertSame($expected,
$this->
findPrimaryKeys($entity_type));
// Then uninstall the field and make sure all primary keys that the field
// was part of have been updated. Since this is not a valid state of the
// entity type (for example a revisionable entity type without a revision ID
// field or a translatable entity type without a language code field) the
// actual primary keys at this point are irrelevant.
$update_manager->
uninstallFieldStorageDefinition($field);
$this->
assertNotEquals($expected,
$this->
findPrimaryKeys($entity_type));
// Finally, reinstall the field and make sure the primary keys have been
// recreated.