You are here

public function EntityPrintAccessTest::testSecondaryEntityTypeAccess in Entity Print 8.2

Test access for a non-node entity type.

@covers ::checkAccess

File

tests/src/Kernel/EntityPrintAccessTest.php, line 127

Class

EntityPrintAccessTest
@coversDefaultClass \Drupal\entity_print\Controller\EntityPrintController @group entity_print

Namespace

Drupal\Tests\entity_print\Kernel

Code

public function testSecondaryEntityTypeAccess() {

  // User with print entity type user permissions and entity view.
  $account = $this
    ->createUser([
    'entity print access type user',
    'access content',
  ]);
  $this
    ->assertTrue($this
    ->checkAccess($account, 'user', $account
    ->id()), 'User with "type user" permission and access content permission is allowed to see the content.');
}