function ResourceTestBase::getAuthenticationRequestOptions
Same name in this branch
- 9 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::getAuthenticationRequestOptions()
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 8.9.x core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 10 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 10 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 11.x core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 11.x core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::getAuthenticationRequestOptions()
Returns Guzzle request options for authentication.
Return value
array Guzzle request options to use for authentication.
See also
\GuzzleHttp\ClientInterface::request()
35 calls to ResourceTestBase::getAuthenticationRequestOptions()
- CommentTest::testCollectionFilterAccess in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php - CommentTest::testPostIndividualDxWithoutCriticalBaseFields in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php - Tests POSTing a comment without critical base fields.
- CommentTest::testPostIndividualSkipCommentApproval in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php - Tests POSTing a comment with and without 'skip comment approval'.
- ConfigurableLanguageTest::testGetIndividualDefaultConfig in core/
modules/ jsonapi/ tests/ src/ Functional/ ConfigurableLanguageTest.php - Tests a GET request for a default config entity, which has a _core key.
- FileTest::testCollectionFilterAccess in core/
modules/ jsonapi/ tests/ src/ Functional/ FileTest.php
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 2564
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getAuthenticationRequestOptions() {
return [
'headers' => [
'Authorization' => 'Basic ' . base64_encode($this->account->name->value . ':' . $this->account->passRaw),
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.