diff --git a/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php b/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php index 85eabee130b6..1e0ee41c4df9 100644 --- a/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php +++ b/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php @@ -103,6 +103,19 @@ public function withoutHeader(string $name) return $this; } + /** + * Remove headers from the request. + * + * @param array $headers + * @return $this + */ + public function withoutHeaders(array $headers) + { + $this->defaultHeaders = array_diff($this->defaultHeaders, $headers); + + return $this; + } + /** * Add an authorization token for the request. *