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 cf2644f commit 9897e3fCopy full SHA for 9897e3f
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -92,6 +92,19 @@ public function flushHeaders()
92
return $this;
93
}
94
95
+ /**
96
+ * Add a bearer token to the request headers.
97
+ *
98
+ * @param string $value
99
+ * @return $this
100
+ */
101
+ public function withBearerToken(string $value)
102
+ {
103
+ $this->defaultHeaders['Authorization'] = 'Bearer '.$value;
104
+
105
+ return $this;
106
+ }
107
108
/**
109
* Define a set of server variables to be sent with the requests.
110
*
0 commit comments