function DefaultHtmlRouteProviderTest::getEntityType
Parameters
\Prophecy\Prophecy\ObjectProphecy|null $base_entity_type: (optional) The prophesize base entity type.
Return value
\Prophecy\Prophecy\ObjectProphecy<\Drupal\Core\Entity\EntityTypeInterface> The entity type prophecy.
4 calls to DefaultHtmlRouteProviderTest::getEntityType()
- DefaultHtmlRouteProviderTest::providerTestGetAddFormRoute in core/
tests/ Drupal/ Tests/ Core/ Entity/ Routing/ DefaultHtmlRouteProviderTest.php - DefaultHtmlRouteProviderTest::providerTestGetAddPageRoute in core/
tests/ Drupal/ Tests/ Core/ Entity/ Routing/ DefaultHtmlRouteProviderTest.php - DefaultHtmlRouteProviderTest::providerTestGetCanonicalRoute in core/
tests/ Drupal/ Tests/ Core/ Entity/ Routing/ DefaultHtmlRouteProviderTest.php - DefaultHtmlRouteProviderTest::providerTestGetCollectionRoute in core/
tests/ Drupal/ Tests/ Core/ Entity/ Routing/ DefaultHtmlRouteProviderTest.php
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ Routing/ DefaultHtmlRouteProviderTest.php, line 418
Class
Namespace
Drupal\Tests\Core\Entity\RoutingCode
protected static function getEntityType(?ObjectProphecy $base_entity_type = NULL) : ObjectProphecy {
$entity_type = (new Prophet())->prophesize(EntityTypeInterface::class);
if ($base_entity_type) {
foreach ($base_entity_type->getMethodProphecies() as $prophecies) {
foreach ($prophecies as $prophecy) {
$entity_type->addMethodProphecy(clone $prophecy);
}
}
}
return $entity_type;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.