You are here

protected function RestJsonApiUnsupported::setUpAuthorization in Drupal 10

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

File

core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php, line 51

Class

RestJsonApiUnsupported
Ensures that the 'api_json' format is not supported by the REST module.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function setUpAuthorization($method) {
  switch ($method) {
    case 'GET':
      $this
        ->grantPermissionsToTestedRole([
        'access content',
      ]);
      break;
    default:
      throw new \UnexpectedValueException();
  }
}