You are here

protected function MassContactTestBase::setUp in Mass Contact 8

Same name in this branch
  1. 8 tests/src/Functional/MassContactTestBase.php \Drupal\Tests\mass_contact\Functional\MassContactTestBase::setUp()
  2. 8 tests/src/Kernel/MassContactTestBase.php \Drupal\Tests\mass_contact\Kernel\MassContactTestBase::setUp()

Overrides BrowserTestBase::setUp

1 call to MassContactTestBase::setUp()
MassContactFormTest::setUp in tests/src/Functional/Form/MassContactFormTest.php
1 method overrides MassContactTestBase::setUp()
MassContactFormTest::setUp in tests/src/Functional/Form/MassContactFormTest.php

File

tests/src/Functional/MassContactTestBase.php, line 42

Class

MassContactTestBase
Base class for functional Mass Contact tests.

Namespace

Drupal\Tests\mass_contact\Functional

Code

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

  // Dummy user 1.
  $this
    ->createUser();
  $this->admin = $this
    ->createUser([
    'mass contact administer',
    'access administration pages',
  ]);
  $this
    ->drupalPlaceBlock('local_actions_block');
  foreach (range(1, 5) as $i) {
    $rid = $this
      ->createRole([]);
    $this->roles[$i] = Role::load($rid);
  }
}