// Create entity reference field with node as a target.
$node_field_name =
$this->
createEntityReferenceField('node',
[$this->type
]);
// Create entity reference field with date format as a target.
$date_format_field_name =
$this->
createEntityReferenceField('date_format'
);
// Display all newly created Entity Reference configuration.
$this->
drupalGet('admin/structure/types/manage/' .
$this->type . '/display'
);
// Check for Taxonomy Term select box values.
// Test if Taxonomy Term Entity Reference Field has the correct formatters.
$this->
assertFieldSelectOptions('fields[field_' .
$taxonomy_term_field_name . '][type]',
[ 'entity_reference_label',
'entity_reference_entity_id',
'entity_reference_rss_category',
'entity_reference_entity_view',
]);
// Test if User Reference Field has the correct formatters.
// Author should be available for this field.
// RSS Category should not be available for this field.
$this->
assertFieldSelectOptions('fields[field_' .
$user_field_name . '][type]',
[ 'author',