You are here

protected function ResourceTestBase::setUpRevisionAuthorization in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::setUpRevisionAuthorization()

Sets up the necessary authorization for handling revisions.

Parameters

string $method: The HTTP method for which to set up authentication.

See also

::testRevisions()

3 calls to ResourceTestBase::setUpRevisionAuthorization()
MediaTest::setUpRevisionAuthorization in core/modules/jsonapi/tests/src/Functional/MediaTest.php
Sets up the necessary authorization for handling revisions.
NodeTest::setUpRevisionAuthorization in core/modules/jsonapi/tests/src/Functional/NodeTest.php
Sets up the necessary authorization for handling revisions.
ResourceTestBase::testRevisions in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests individual and collection revisions.
2 methods override ResourceTestBase::setUpRevisionAuthorization()
MediaTest::setUpRevisionAuthorization in core/modules/jsonapi/tests/src/Functional/MediaTest.php
Sets up the necessary authorization for handling revisions.
NodeTest::setUpRevisionAuthorization in core/modules/jsonapi/tests/src/Functional/NodeTest.php
Sets up the necessary authorization for handling revisions.

File

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

Class

ResourceTestBase
Subclass this for every JSON:API resource type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function setUpRevisionAuthorization($method) {
  assert($method === 'GET', 'Only read operations on revisions are supported.');
  $this
    ->setUpAuthorization($method);
}