$component = EntityFormDisplay::
load($display_id)->
getComponent($component_id);
$this->
assertIsArray($component);
$this->
assertSame($widget_type,
$component['type'
]);
$this->
assertSame($weight,
$component['weight'
]);
} /**
* Tests that migrated view modes can be loaded using D8 APIs.
*/
public function testWidgetSettings() { $this->
assertEntity('node.page.default', 'node', 'page'
);
$this->
assertComponent('node.page.default', 'body', 'text_textarea_with_summary', -4
);
$this->
assertComponent('node.page.default', 'field_text_plain', 'string_textfield', -2
);
$this->
assertComponent('node.page.default', 'field_text_filtered', 'text_textfield', 0
);
$this->
assertComponent('node.page.default', 'field_text_long_plain', 'string_textarea', 4
);
$this->
assertComponent('node.page.default', 'field_text_long_filtered', 'text_textarea', 6
);
$this->
assertComponent('node.page.default', 'field_text_sum_filtered', 'text_textarea_with_summary', 12
);
$this->
assertEntity('node.article.default', 'node', 'article'
);
$this->
assertComponent('node.article.default', 'body', 'text_textarea_with_summary', -4
);
$this->
assertComponent('node.article.default', 'field_tags', 'entity_reference_autocomplete', -4
);
$this->
assertComponent('node.article.default', 'field_image', 'image_image', -1
);
$this->
assertComponent('node.article.default', 'field_text_plain', 'string_textfield', 11
);