function DefaultHtmlRouteProviderTest::getEntityType

Same name and namespace in other branches
  1. 9 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:

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

Class

DefaultHtmlRouteProviderTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21Routing%21DefaultHtmlRouteProvider.php/class/DefaultHtmlRouteProvider/8.9.x" title="Provides HTML routes for entities." class="local">\Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider</a> @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.