function DefaultHtmlRouteProviderTest::getEntityType

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::getEntityType()
  2. 10 core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::getEntityType()
  3. 11.x core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::getEntityType()

Parameters

\Prophecy\Prophecy\ObjectProphecy $base_entity_type: (optional) The prophesize 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 342

Class

DefaultHtmlRouteProviderTest
@coversDefaultClass \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider @group Entity

Namespace

Drupal\Tests\Core\Entity\Routing

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.