function BasicAuthResourceTestTrait::getAuthenticationRequestOptions
Same name in other branches
- 8.9.x core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php \Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait::getAuthenticationRequestOptions()
- 10 core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php \Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait::getAuthenticationRequestOptions()
- 11.x core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php \Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait::getAuthenticationRequestOptions()
1 call to BasicAuthResourceTestTrait::getAuthenticationRequestOptions()
- LayoutRestTestBase::request in core/
modules/ layout_builder/ tests/ src/ Functional/ Rest/ LayoutRestTestBase.php - Performs a HTTP request. Wraps the Guzzle HTTP client.
File
-
core/
modules/ rest/ tests/ src/ Functional/ BasicAuthResourceTestTrait.php, line 23
Class
- BasicAuthResourceTestTrait
- Trait for ResourceTestBase subclasses testing $auth=basic_auth.
Namespace
Drupal\Tests\rest\FunctionalCode
protected function getAuthenticationRequestOptions($method) {
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.