public function testGetAddFormRoute(Route
$expected = NULL, EntityTypeInterface
$entity_type, EntityTypeInterface
$bundle_entity_type = NULL, FieldStorageDefinitionInterface
$field_storage_definition = NULL
) { if ($bundle_entity_type) { $this->entityTypeManager->
getDefinition('the_bundle_entity_type_id'
)->
willReturn($bundle_entity_type);
if ($field_storage_definition) { $this->entityFieldManager->
getFieldStorageDefinitions('the_bundle_entity_type_id'
) ->
willReturn(['id' =>
$field_storage_definition]);
} } $route =
$this->routeProvider->
getAddFormRoute($entity_type);
$this->
assertEquals($expected,
$route);
} public static function providerTestGetAddFormRoute() { $prophet =
new Prophet();
$data =
[];
$entity_type1 =
static::
getEntityType();
$entity_type1->
hasLinkTemplate('add-form'
)->
willReturn(FALSE
);
$data['no_add_form_link_template'
] =
[NULL,
$entity_type1->
reveal()];