'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
])->
save();
$handler_settings =
[ 'target_bundles' =>
[ $vocabulary->
id() =>
$vocabulary->
id(),
],
];
$this->
createEntityReferenceField('node', 'article', 'field_' .
$vocabulary->
id(), 'Tags', 'taxonomy_term', 'default',
$handler_settings);
\Drupal::
service('entity_display.repository'
) ->
getFormDisplay('node', 'article'
) ->
setComponent('field_' .
$vocabulary->
id()) ->
save();
// Setup node access testing.
node_access_rebuild();
node_access_test_add_field(NodeType::
load('article'
));
\Drupal::
state()->
set('node_access_test.private', TRUE
);
} /**
* Runs the field CRUD tests.
*
* In order to act on the same fields, and not create the fields over and over
* again the following tests create, update and delete the same fields.
*/