public function EntityManagerTest::testGetAccessControlHandler in Drupal 8
@covers ::getAccessControlHandler
@expectedDeprecation EntityManagerInterface::getAccessControlHandler() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeManager::getAccessControlHandler() instead. See https://www.drupal.org/node/2549139
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityManagerTest.php, line 700
Class
- EntityManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityManager @group Entity @group legacy
Namespace
Drupal\Tests\Core\EntityCode
public function testGetAccessControlHandler() {
$access_control_handler = $this
->prophesize(EntityAccessControlHandlerInterface::class)
->reveal();
$this->entityTypeManager
->getAccessControlHandler('entity_test')
->shouldBeCalled()
->willReturn($access_control_handler);
$this
->assertInstanceOf(EntityAccessControlHandlerInterface::class, $this->entityManager
->getAccessControlHandler('entity_test'));
}