You are here

protected function ContactStorageTest::setUp in Contact Storage 8

Overrides BrowserTestBase::setUp

File

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

Class

ContactStorageTest
Tests storing contact messages and viewing them through UI.

Namespace

Drupal\Tests\contact_storage\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalPlaceBlock('system_breadcrumb_block');
  $this
    ->drupalPlaceBlock('local_actions_block');
  $this
    ->drupalPlaceBlock('page_title_block');
  $full_html_format = FilterFormat::create([
    'format' => 'full_html',
    'name' => 'Full HTML',
  ]);
  $full_html_format
    ->save();

  // Create and login administrative user.
  $this->adminUser = $this
    ->drupalCreateUser([
    'access site-wide contact form',
    'administer contact forms',
    'administer users',
    'administer account settings',
    'administer contact_message fields',
    'administer contact_message form display',
    'administer contact_message display',
    'use text format full_html',
  ]);
  $this
    ->drupalLogin($this->adminUser);
}