// entity field manager, the t() cache, etc. are all cleared.
$this->
resetAll();
} /**
* Tests that translated field descriptions do not affect the update system.
*/
public function testTranslatedSchemaDefinition() { /** @var \Drupal\locale\StringDatabaseStorage $stringStorage */
$stringStorage = \Drupal::
service('locale.storage'
);
$source =
$stringStorage->
createString([ 'source' => 'Revision ID',
])->
save();
$stringStorage->
createTranslation([ 'lid' =>
$source->lid,
'language' => 'fr',
'translation' => 'Translated Revision ID',
])->
save();
// Ensure that the field is translated when access through the API.
$this->
assertEquals('Translated Revision ID', \Drupal::
service('entity_field.manager'
)->
getBaseFieldDefinitions('node'
)['vid'
]->
getLabel());