You are here

protected function JsonapiResourceTest::getAuthenticationRequestOptions in JSON:API Resources 8

Returns Guzzle request options for authentication.

Return value

array Guzzle request options to use for authentication.

See also

\GuzzleHttp\ClientInterface::request()

5 calls to JsonapiResourceTest::getAuthenticationRequestOptions()
JsonapiResourceTest::testAddCommentResource in tests/src/Functional/JsonapiResourceTest.php
Tests the custom Add Comment resource.
JsonapiResourceTest::testAddReminderResource in tests/src/Functional/JsonapiResourceTest.php
Tests the custom Add Reminder resource.
JsonapiResourceTest::testAuthorContentResource in tests/src/Functional/JsonapiResourceTest.php
Tests the Author Content resource.
JsonapiResourceTest::testCurrentUserInfoResource in tests/src/Functional/JsonapiResourceTest.php
Tests the Current User Info resource.
JsonapiResourceTest::testFeaturedNodesResource in tests/src/Functional/JsonapiResourceTest.php
Tests the custom Featured Nodes resource.

File

tests/src/Functional/JsonapiResourceTest.php, line 351

Class

JsonapiResourceTest
Tests JSON:API Resource processors.

Namespace

Drupal\Tests\jsonapi_resources\Functional

Code

protected function getAuthenticationRequestOptions() {
  return [
    'headers' => [
      'Authorization' => 'Basic ' . base64_encode($this->account->name->value . ':' . $this->account->passRaw),
    ],
  ];
}