You are here

public function UncacheableEntityAccessControlHandlerTest::testCreateAccess in Entity API 8

@covers ::checkCreateAccess

@dataProvider createAccessProvider

File

tests/src/Unit/UncacheableEntityAccessControlHandlerTest.php, line 66

Class

UncacheableEntityAccessControlHandlerTest
@coversDefaultClass \Drupal\entity\UncacheableEntityAccessControlHandler @group entity

Namespace

Drupal\Tests\entity\Unit

Code

public function testCreateAccess(EntityTypeInterface $entity_type, $bundle, $account, $allowed) {
  $handler = new UncacheableEntityAccessControlHandler($entity_type);
  $handler
    ->setStringTranslation($this
    ->getStringTranslationStub());
  $result = $handler
    ->createAccess($bundle, $account);
  $this
    ->assertEquals($allowed, $result);
}