'type' => 'datetime_default',
'label' => 'hidden',
'settings' =>
['format_type' => 'medium'
] +
$this->defaultSettings,
];
// Verify that the date is output according to the formatter settings.
$options =
[ 'format_type' =>
['short', 'medium', 'long'
],
];
// Formats that display a time component for date-only fields will display
// the default time, so that is applied before calculating the expected
// value.
$this->
massageTestDate($date);
foreach ($options as $setting =>
$values) { foreach ($values as $new_value) { // Update the entity display settings.
$this->displayOptions
['settings'
] =
[$setting =>
$new_value] +
$this->defaultSettings;
$this->container->
get('entity_display.repository'
) ->
getViewDisplay($this->field->
getTargetEntityTypeId(),
$this->field->
getTargetBundle(), 'full'
) ->
setComponent($field_name,
$this->displayOptions
) ->
save();
$this->
renderTestEntity($id);
switch ($setting) {