function ContentTranslationTestBase::getTranslatorPermissions

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

Returns an array of permissions needed for the translator.

2 calls to ContentTranslationTestBase::getTranslatorPermissions()
ContentTranslationTestBase::getAdministratorPermissions in core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
Returns an array of permissions needed for the administrator.
ContentTranslationTestBase::setupUsers in core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
Creates and activates translator, editor and admin users.

File

core/modules/content_translation/src/Tests/ContentTranslationTestBase.php, line 122

Class

ContentTranslationTestBase
Base class for content translation tests.

Namespace

Drupal\content_translation\Tests

Code

protected function getTranslatorPermissions() {
    return array_filter([
        $this->getTranslatePermission(),
        'create content translations',
        'update content translations',
        'delete content translations',
    ]);
}

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