function ContentTranslationTestBase::setupUsers

Same name in other branches
  1. 9 core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::setupUsers()
  2. 8.9.x core/modules/content_translation/src/Tests/ContentTranslationTestBase.php \Drupal\content_translation\Tests\ContentTranslationTestBase::setupUsers()
  3. 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::setupUsers()
  4. 10 core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::setupUsers()

Creates and activates translator, editor and admin users.

2 calls to ContentTranslationTestBase::setupUsers()
ContentTranslationTestBase::doSetup in core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
Completes preparation for content translation tests.
ContentTranslationWorkflowsTest::setupUsers in core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
Creates and activates translator, editor and admin users.
1 method overrides ContentTranslationTestBase::setupUsers()
ContentTranslationWorkflowsTest::setupUsers in core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
Creates and activates translator, editor and admin users.

File

core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php, line 149

Class

ContentTranslationTestBase
Base class for content translation tests.

Namespace

Drupal\Tests\content_translation\Functional

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.