protected function FieldAccessTest::setUp in User protect 8
Overrides UserProtectKernelTestBase::setUp
File
- tests/
src/ Kernel/ FieldAccessTest.php, line 22
Class
- FieldAccessTest
- Tests field access for each UserProtection plugin that protects a field.
Namespace
Drupal\Tests\userprotect\KernelCode
protected function setUp() {
parent::setUp();
// Create an user who administer users. Explicitly set user ID to '2'
// because user 1 would have all permissions.
$perm = [
'administer users',
'administer permissions',
];
$this->userAdmin = $this
->drupalCreateUser($perm, NULL, FALSE, [
'uid' => 2,
]);
}