You are here

protected function AnonResourceTestTrait::assertResponseWhenMissingAuthentication in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php \Drupal\Tests\rest\Functional\AnonResourceTestTrait::assertResponseWhenMissingAuthentication()
  2. 10 core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php \Drupal\Tests\rest\Functional\AnonResourceTestTrait::assertResponseWhenMissingAuthentication()

File

core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php, line 27

Class

AnonResourceTestTrait
Trait for ResourceTestBase subclasses testing $auth=NULL, i.e. authless/anon.

Namespace

Drupal\Tests\rest\Functional

Code

protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response) {
  throw new \LogicException('When testing for anonymous users, authentication cannot be missing.');
}