$expected['settings'
]['format_type'
] = 'fallback';
$component =
$display->
getComponent('field_test_datetime'
);
$this->
assertSame($expected,
$component);
// Test a date field with a random format which should be mapped
// to datetime_default.
$display = EntityViewDisplay::
load('node.story.rss'
);
$expected['settings'
]['format_type'
] = 'fallback';
$component =
$display->
getComponent('field_test_datetime'
);
$this->
assertSame($expected,
$component);
// Test that our Id map has the correct data.
$this->
assertSame([['node', 'story', 'teaser', 'field_test'
]],
$this->
getMigration('d6_field_formatter_settings'
)->
getIdMap()->
lookupDestinationIds(['story', 'teaser', 'node', 'field_test'
]));
// Test hidden field.
$this->
assertComponentNotExists('node.test_planet.teaser', 'field_test_text_single_checkbox'
);
// Test a node reference field, which should be migrated to an entity
// reference field.
$display = EntityViewDisplay::
load('node.employee.default'
);
$component =
$display->
getComponent('field_company'
);
$this->
assertIsArray($component);
$this->
assertSame('entity_reference_label',
$component['type'
]);
// The default node reference formatter shows the referenced node's title