You are here

protected function DevelSwitchUserTest::setUp in Devel 4.x

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::setUp()
  2. 8 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::setUp()
  3. 8.2 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::setUp()

Set up test.

Overrides DevelBrowserTestBase::setUp

File

tests/src/Functional/DevelSwitchUserTest.php, line 45

Class

DevelSwitchUserTest
Tests switch user.

Namespace

Drupal\Tests\devel\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->block = $this
    ->drupalPlaceBlock('devel_switch_user', [
    'id' => 'switch-user',
    'label' => 'Switch Hit',
  ]);
  $this->develUser = $this
    ->drupalCreateUser([
    'access devel information',
    'switch users',
  ], 'Devel User Four');
  $this->switchUser = $this
    ->drupalCreateUser([
    'switch users',
  ], 'Switch User Five');
  $this->webUser = $this
    ->drupalCreateUser([], 'Web User Six');
}