public function EntityTypeManagerTest::testGetViewBuilder in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetViewBuilder()
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetViewBuilder()
Tests the getViewBuilder() method.
@covers ::getViewBuilder
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 202 - Contains \Drupal\Tests\Core\Entity\EntityTypeManagerTest.
Class
- EntityTypeManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityTypeManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetViewBuilder() {
$class = $this
->getTestHandlerClass();
$entity = $this
->prophesize(EntityTypeInterface::class);
$entity
->getHandlerClass('view_builder')
->willReturn($class);
$this
->setUpEntityTypeDefinitions([
'test_entity_type' => $entity,
]);
$this
->assertInstanceOf($class, $this->entityTypeManager
->getViewBuilder('test_entity_type'));
}