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\KernelCode
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.');
}