protected function ResourceTestBase::getAuthenticationRequestOptions in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
Returns Guzzle request options for authentication.
Return value
array Guzzle request options to use for authentication.
See also
\GuzzleHttp\ClientInterface::request()
24 calls to ResourceTestBase::getAuthenticationRequestOptions()
- CommentTest::testCollectionFilterAccess in tests/
src/ Functional/ CommentTest.php - CommentTest::testPostIndividualDxWithoutCriticalBaseFields in tests/
src/ Functional/ CommentTest.php - Tests POSTing a comment without critical base fields.
- CommentTest::testPostIndividualSkipCommentApproval in tests/
src/ Functional/ CommentTest.php - Tests POSTing a comment with and without 'skip comment approval'.
- ConfigurableLanguageTest::testGetIndividualDefaultConfig in tests/
src/ Functional/ ConfigurableLanguageTest.php - Test a GET request for a default config entity, which has a _core key.
- FileTest::testCollectionFilterAccess in tests/
src/ Functional/ FileTest.php
File
- tests/
src/ Functional/ ResourceTestBase.php, line 2424
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),
],
];
}