$display =
[ 'label' => 'hidden',
'type' => 'field_test_multiple',
'settings' =>
[ 'test_formatter_setting_multiple' =>
$this->
randomMachineName(),
'alter' => TRUE,
],
];
$build =
$items->
view($display);
$this->
render($build);
$setting =
$display['settings'
]['test_formatter_setting_multiple'
];
$this->
assertNoText($this->label, 'Label was not displayed.'
);
$this->
assertText('field_test_entity_display_build_alter', 'Alter fired, display passed.'
);
$this->
assertText('entity language is en', 'Language is placed onto the context.'
);
$array =
[];
foreach ($this->values
as $delta =>
$value) { $array[] =
$delta . ':' .
$value['value'
];
} $this->
assertText($setting . '|' .
implode('|',
$array), 'Values were displayed with expected setting.'
);
// Display settings: Check visually_hidden field.
$display =
[ 'label' => 'visually_hidden',