function ResourceTestBase::assertResponseWhenMissingAuthentication

Same name and namespace in other branches
  1. 11.x core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::assertResponseWhenMissingAuthentication()

Verifies the error response in case of missing authentication.

Parameters

string $method: HTTP method.

\Psr\Http\Message\ResponseInterface $response: The response to assert.

File

core/modules/rest/tests/src/Functional/ResourceTestBase.php, line 224

Class

ResourceTestBase
Subclass this for every REST resource, every format and every auth provider.

Namespace

Drupal\Tests\rest\Functional

Code

abstract protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response);

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