abstract protected function ResourceTestBase::assertResponseWhenMissingAuthentication in Drupal 8
Same name and namespace in other branches
- 9 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.
4 calls to ResourceTestBase::assertResponseWhenMissingAuthentication()
- EntityResourceTestBase::testDelete in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - Tests a DELETE request for an entity, plus edge cases to ensure good DX.
- EntityResourceTestBase::testGet in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - Test a GET request for an entity, plus edge cases to ensure good DX.
- EntityResourceTestBase::testPatch in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - Tests a PATCH request for an entity, plus edge cases to ensure good DX.
- EntityResourceTestBase::testPost in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - Tests a POST request for an entity, plus edge cases to ensure good DX.
File
- core/
modules/ rest/ tests/ src/ Functional/ ResourceTestBase.php, line 223
Class
- ResourceTestBase
- Subclass this for every REST resource, every format and every auth provider.
Namespace
Drupal\Tests\rest\FunctionalCode
protected abstract function assertResponseWhenMissingAuthentication($method, ResponseInterface $response);