You are here

protected function MenuLinkFieldStandardTest::loginUser in Menu Link (Field) 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/MenuLinkFieldStandardTest.php \Drupal\Tests\menu_link\Functional\MenuLinkFieldStandardTest::loginUser()

Test user login.

File

tests/src/Functional/MenuLinkFieldStandardTest.php, line 39

Class

MenuLinkFieldStandardTest
Tests menu link field functionality.

Namespace

Drupal\Tests\menu_link\Functional

Code

protected function loginUser() : void {
  $perms = array_keys(\Drupal::service('user.permissions')
    ->getPermissions());
  $this->adminUser = $this
    ->drupalCreateUser($perms);
  $this
    ->drupalLogin($this->adminUser);
}