function EntityTypeManagerTest::testGetHandlerMissingHandler
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetHandlerMissingHandler()
- 10 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetHandlerMissingHandler()
- 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetHandlerMissingHandler()
Tests the getHandler() method when no controller is defined.
@covers ::getHandler
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 291
Class
- EntityTypeManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityTypeManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetHandlerMissingHandler() {
$entity = $this->prophesize(EntityTypeInterface::class);
$entity->getHandlerClass('storage')
->willReturn('');
$this->setUpEntityTypeDefinitions([
'test_entity_type' => $entity,
]);
$this->expectException(InvalidPluginDefinitionException::class);
$this->entityTypeManager
->getHandler('test_entity_type', 'storage');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.