You are here

protected function ProfileFieldAccessTest::setUp in Profile 8

Overrides ProfileTestBase::setUp

File

tests/src/Functional/ProfileFieldAccessTest.php, line 32

Class

ProfileFieldAccessTest
Tests profile field access functionality.

Namespace

Drupal\Tests\profile\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->adminUser = $this
    ->drupalCreateUser([
    'access user profiles',
    'administer profile',
    'administer profile types',
    'administer profile fields',
    'administer profile display',
  ]);
  $user_permissions = [
    'access user profiles',
    "create {$this->type->id()} profile",
    "update own {$this->type->id()} profile",
    "view any {$this->type->id()} profile",
  ];
  $this->webUser = $this
    ->drupalCreateUser($user_permissions);
  $this->otherUser = $this
    ->drupalCreateUser($user_permissions);
}