You are here

public function FormModeManagerBase::setUpUsers in Form mode manager 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/FormModeManagerBase.php \Drupal\Tests\form_mode_manager\Functional\FormModeManagerBase::setUpUsers()

Helper method to create all users needed for tests.

1 call to FormModeManagerBase::setUpUsers()
FormModeManagerBase::setUp in tests/src/Functional/FormModeManagerBase.php

File

tests/src/Functional/FormModeManagerBase.php, line 121

Class

FormModeManagerBase
Provides a test case for form_mode_manager functional tests.

Namespace

Drupal\Tests\form_mode_manager\Functional

Code

public function setUpUsers() {
  $this->anonymousUser = $this
    ->drupalCreateUser([
    'access content',
  ]);
  $this->adminUser = $this
    ->drupalCreateUser([
    'access content',
    'access administration pages',
    'administer site configuration',
    'administer users',
    'administer permissions',
    'administer content types',
    'administer node fields',
    'administer node display',
    'administer node form display',
    'administer nodes',
    'administer display modes',
    'use node.default form mode',
    'use user.default form mode',
    'use ' . $this->nodeFormMode
      ->id() . ' form mode',
    'use ' . $this->userFormMode
      ->id() . ' form mode',
    'edit any ' . $this->nodeTypeFmm1
      ->id() . ' content',
    'create ' . $this->nodeTypeFmm1
      ->id() . ' content',
  ]);
  $this->testUser = $this
    ->drupalCreateUser([
    'access content',
  ]);
}