function DefaultHtmlRouteProviderTest::testGetEntityTypeIdKeyTypeNotFieldable

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

@covers ::getEntityTypeIdKeyType

File

core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php, line 327

Class

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

Namespace

Drupal\Tests\Core\Entity\Routing

Code

public function testGetEntityTypeIdKeyTypeNotFieldable() {
    $entity_type = $this->prophesize(EntityTypeInterface::class);
    $entity_type->entityClassImplements(FieldableEntityInterface::class)
        ->willReturn(FALSE);
    $this->entityFieldManager
        ->getFieldStorageDefinitions(Argument::any())
        ->shouldNotBeCalled();
    $type = $this->routeProvider
        ->getEntityTypeIdKeyType($entity_type->reveal());
    $this->assertNull($type);
}

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