protected function BasicAuthResourceTestTrait::getAuthenticationRequestOptions in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php \Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait::getAuthenticationRequestOptions()
- 9 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),
],
];
}