You are here

protected function ContactPersonalTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/contact/tests/src/Functional/ContactPersonalTest.php \Drupal\Tests\contact\Functional\ContactPersonalTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/contact/tests/src/Functional/ContactPersonalTest.php, line 57

Class

ContactPersonalTest
Tests personal contact form functionality.

Namespace

Drupal\Tests\contact\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();
}