function ContentTranslationTestBase::getAdministratorPermissions

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

Returns an array of permissions needed for the administrator.

5 calls to ContentTranslationTestBase::getAdministratorPermissions()
ContentTranslationPendingRevisionTestBase::enableContentModeration in core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
Enables content moderation for the test entity type and bundle.
ContentTranslationTestBase::setupUsers in core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
Creates and activates translator, editor and admin users.
MediaTranslationUITest::getAdministratorPermissions in core/modules/media/tests/src/Functional/MediaTranslationUITest.php
Returns an array of permissions needed for the administrator.
MenuLinkContentTranslationUITest::getAdministratorPermissions in core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
Returns an array of permissions needed for the administrator.
NodeTranslationUITest::getAdministratorPermissions in core/modules/node/tests/src/Functional/NodeTranslationUITest.php
Returns an array of permissions needed for the administrator.
3 methods override ContentTranslationTestBase::getAdministratorPermissions()
MediaTranslationUITest::getAdministratorPermissions in core/modules/media/tests/src/Functional/MediaTranslationUITest.php
Returns an array of permissions needed for the administrator.
MenuLinkContentTranslationUITest::getAdministratorPermissions in core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
Returns an array of permissions needed for the administrator.
NodeTranslationUITest::getAdministratorPermissions in core/modules/node/tests/src/Functional/NodeTranslationUITest.php
Returns an array of permissions needed for the administrator.

File

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

Class

ContentTranslationTestBase
Base class for content translation tests.

Namespace

Drupal\Tests\content_translation\Functional

Code

protected function getAdministratorPermissions() {
    return array_merge($this->getEditorPermissions(), $this->getTranslatorPermissions(), [
        'administer languages',
        'administer content translation',
    ]);
}

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