function EntityTypeManagerTest::testGetAccessControlHandler
Tests the getAccessControlHandler() method.
@legacy-covers ::getAccessControlHandler
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 215
Class
Namespace
Drupal\Tests\Core\EntityCode
public function testGetAccessControlHandler() : void {
$entity = $this->prophesize(EntityTypeInterface::class);
$entity->getHandlerClass('access')
->willReturn(StubEntityHandlerBase::class);
$this->setUpEntityTypeDefinitions([
'test_entity_type' => $entity,
]);
$this->assertInstanceOf(StubEntityHandlerBase::class, $this->entityTypeManager
->getAccessControlHandler('test_entity_type'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.