function ResourceTestBase::getEditorialPermissions

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getEditorialPermissions()
  2. 10 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getEditorialPermissions()
  3. 11.x core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getEditorialPermissions()

Gets an array of permissions required to view and update any tested entity.

Return value

string[] An array of permission names.

2 calls to ResourceTestBase::getEditorialPermissions()
MediaTest::getEditorialPermissions in core/modules/jsonapi/tests/src/Functional/MediaTest.php
Gets an array of permissions required to view and update any tested entity.
ResourceTestBase::testRevisions in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests individual and collection revisions.
1 method overrides ResourceTestBase::getEditorialPermissions()
MediaTest::getEditorialPermissions in core/modules/jsonapi/tests/src/Functional/MediaTest.php
Gets an array of permissions required to view and update any tested entity.

File

core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php, line 3286

Class

ResourceTestBase
Subclass this for every JSON:API resource type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getEditorialPermissions() {
    return [
        'view latest version',
        "view any unpublished content",
    ];
}

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