function RestJsonApiUnsupportedTest::setUpAuthorization

Overrides ResourceTestBase::setUpAuthorization

1 call to RestJsonApiUnsupportedTest::setUpAuthorization()
RestJsonApiUnsupportedTest::testApiJsonNotSupportedInRest in core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupportedTest.php
Deploying a REST resource using api_json format results in 400 responses.

File

core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupportedTest.php, line 53

Class

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

Namespace

Drupal\Tests\jsonapi\Functional

Code

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

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