🔧 Update npm + login page

This commit is contained in:
TiclemFR
2024-01-25 14:00:48 +01:00
parent 468c2cd0e6
commit 336f2bae93
128 changed files with 3078 additions and 2368 deletions

View File

@@ -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);
}
/**