We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9112ad commit 151cd17Copy full SHA for 151cd17
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -93,14 +93,15 @@ public function flushHeaders()
93
}
94
95
/**
96
- * Add a bearer token to the request headers.
+ * Add an authorization token for the request.
97
*
98
- * @param string $value
+ * @param string $token
99
+ * @param string $type
100
* @return $this
101
*/
- public function withBearerToken(string $value)
102
+ public function withToken(string $token, string $type = 'Bearer')
103
{
- $this->defaultHeaders['Authorization'] = 'Bearer '.$value;
104
+ $this->defaultHeaders['Authorization'] = trim($type.' '.$token);
105
106
return $this;
107
0 commit comments