protected function DefaultHtmlRouteProviderTest::getEntityType in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::getEntityType()
Parameters
\Prophecy\Prophecy\ObjectProphecy $base_entity_type:
Return value
\Prophecy\Prophecy\ObjectProphecy
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 340 - Contains \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest.
Class
- DefaultHtmlRouteProviderTest
- @coversDefaultClass \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider @group Entity
Namespace
Drupal\Tests\Core\Entity\RoutingCode
protected function getEntityType(ObjectProphecy $base_entity_type = NULL) {
$entity_type = $this
->prophesize(EntityTypeInterface::class);
if ($base_entity_type) {
foreach ($base_entity_type
->getMethodProphecies() as $method => $prophecies) {
foreach ($prophecies as $prophecy) {
$entity_type
->addMethodProphecy(clone $prophecy);
}
}
}
return $entity_type;
}