$this->entityTypeManager =
$this->
prophesize(EntityTypeManagerInterface::
class);
$this->entityFieldManager =
$this->
prophesize(EntityFieldManagerInterface::
class);
$this->routeProvider =
new TestDefaultHtmlRouteProvider($this->entityTypeManager->
reveal(),
$this->entityFieldManager->
reveal());
} /**
* @covers ::getAddPageRoute
* @dataProvider providerTestGetAddPageRoute
*/
public function testGetAddPageRoute(Route
$expected = NULL, EntityTypeInterface
$entity_type) { $route =
$this->routeProvider->
getAddPageRoute($entity_type);
$this->
assertEquals($expected,
$route);
} public static function providerTestGetAddPageRoute() { $data =
[];
$entity_type1 =
static::
getEntityType();
$entity_type1->
hasLinkTemplate('add-page'
)->
willReturn(FALSE
);
$data['no_add_page_link_template'
] =
[NULL,
$entity_type1->
reveal()];
$entity_type2 =
static::
getEntityType();