You are here

public function PermissionModeTest::testCanAdminUserAccessByNodeId in Permissions by Term 8.2

File

tests/src/Kernel/PermissionModeTest.php, line 38

Class

PermissionModeTest
Class AccessCheckTest

Namespace

Drupal\Tests\permissions_by_term\Kernel

Code

public function testCanAdminUserAccessByNodeId() : void {
  $this
    ->createRelationWithoutRestriction();
  \Drupal::configFactory()
    ->getEditable('permissions_by_term.settings')
    ->set('permission_mode', TRUE)
    ->save();
  self::assertTrue($this->accessCheck
    ->canUserAccessByNode(Node::load($this
    ->getNidNoRestriction()), 1), 'Admin user is not allowed. But this user must be allowed.');
}