You are here

protected function ContactStoragePersonalTest::setUp in Contact Storage 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ContactStoragePersonalTest.php, line 54

Class

ContactStoragePersonalTest
Tests personal contact form functionality.

Namespace

Drupal\Tests\contact_storage\Functional

Code

protected function setUp() {
  parent::setUp();

  // Create an admin user.
  $this->adminUser = $this
    ->drupalCreateUser([
    'administer contact forms',
    'administer users',
    'administer account settings',
    'access site reports',
  ]);

  // Create some normal users with their contact forms enabled by default.
  $this
    ->config('contact.settings')
    ->set('user_default_enabled', TRUE)
    ->save();
  $this->webUser = $this
    ->drupalCreateUser([
    'access user profiles',
    'access user contact forms',
  ]);
  $this->contactUser = $this
    ->drupalCreateUser();
}