function 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 \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider[[api-linebreak]] @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.