$this->fieldLayoutBuilder =
new FieldLayoutBuilder($this->layoutPluginManager->
reveal(),
$this->entityFieldManager->
reveal());
} /**
* @covers ::buildView
* @covers ::getFields
*/
public function testBuildView() { $definitions =
[];
$non_configurable_field_definition =
$this->
prophesize(FieldDefinitionInterface::
class);
$non_configurable_field_definition->
isDisplayConfigurable('view'
)->
willReturn(FALSE
);
$definitions['non_configurable_field'
] =
$non_configurable_field_definition->
reveal();
$definitions['non_configurable_field_with_extra_field'
] =
$non_configurable_field_definition->
reveal();
$this->entityFieldManager->
getFieldDefinitions('the_entity_type_id', 'the_entity_type_bundle'
)->
willReturn($definitions);
$extra_fields =
[];
$extra_fields['non_configurable_field_with_extra_field'
] =
[ 'label' => 'This non-configurable field is also defined in hook_entity_extra_field_info()',
];
$this->entityFieldManager->
getExtraFields('the_entity_type_id', 'the_entity_type_bundle'
)->
willReturn($extra_fields);
$build =
[ 'test1' =>
[