protected function EntityTranslationTestBase::setupUsers

Creates and activates translator, editor and admin users.

1 call to EntityTranslationTestBase::setupUsers()
EntityTranslationTestBase::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php
Sets up a Drupal site for running functional and integration tests.

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php, line 130
Contains \Drupal\entity\Tests\EntityTranslationTestBase.

Class

EntityTranslationTestBase
Tests entity translation workflows.

Namespace

Drupal\translation_entity\Tests

Code

protected function setupUsers() {
  $this->translator = $this
    ->drupalCreateUser($this
    ->getTranslatorPermissions(), 'translator');
  $this->editor = $this
    ->drupalCreateUser($this
    ->getEditorPermissions(), 'editor');
  $this->administrator = $this
    ->drupalCreateUser(array_merge($this
    ->getEditorPermissions(), $this
    ->getTranslatorPermissions()), 'administrator');
  $this
    ->drupalLogin($this->translator);
}