public function BundleEntityAccessControlHandlerTest::testAccess in Entity API 8
@covers ::checkAccess
@dataProvider accessProvider
File
- tests/
src/ Unit/ BundleEntityAccessControlHandlerTest.php, line 46
Class
- BundleEntityAccessControlHandlerTest
- @coversDefaultClass \Drupal\entity\BundleEntityAccessControlHandler @group entity
Namespace
Drupal\Tests\entity\UnitCode
public function testAccess(EntityInterface $entity, $operation, $account, $allowed) {
$handler = new BundleEntityAccessControlHandler($entity
->getEntityType());
$handler
->setStringTranslation($this
->getStringTranslationStub());
$result = $handler
->access($entity, $operation, $account);
$this
->assertEquals($allowed, $result);
}