✨ 🔧 Update npm + login page
This commit is contained in:
@@ -36,6 +36,13 @@ class Factory
|
||||
*/
|
||||
protected $globalMiddleware = [];
|
||||
|
||||
/**
|
||||
* The options to apply to every request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $globalOptions = [];
|
||||
|
||||
/**
|
||||
* The stub callables that will handle requests.
|
||||
*
|
||||
@@ -123,6 +130,19 @@ class Factory
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the options to apply to every request.
|
||||
*
|
||||
* @param array $options
|
||||
* @return $this
|
||||
*/
|
||||
public function globalOptions($options)
|
||||
{
|
||||
$this->globalOptions = $options;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new response instance for use during stubbing.
|
||||
*
|
||||
@@ -400,7 +420,7 @@ class Factory
|
||||
*/
|
||||
protected function newPendingRequest()
|
||||
{
|
||||
return new PendingRequest($this, $this->globalMiddleware);
|
||||
return (new PendingRequest($this, $this->globalMiddleware))->withOptions($this->globalOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user