function DevelSwitchUserTest::setUp

Same name and namespace in other branches
  1. 4.x tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::setUp()

Set up test.

Overrides DevelBrowserTestBase::setUp

File

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

Class

DevelSwitchUserTest
Tests switch user.

Namespace

Drupal\Tests\devel\Functional

Code

protected function setUp() : void {
  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');
  $this->longUser = $this->drupalCreateUser([], 'Long User Seven name has the maximum length of 60 characters');
}