added tests for too many emails sent

This commit is contained in:
Denis Duliçi
2023-05-03 00:14:25 +03:00
parent 3d85092082
commit c60b48d65f
2 changed files with 56 additions and 1 deletions

View File

@ -30,12 +30,16 @@ class TellFirewallTooManyEmailsSent
public function loadConfig(): void
{
if (! empty(Config::get('firewall.middleware.' . $this->middleware))) {
return;
}
$config = array_merge_recursive(
Config::get('firewall'),
[
'middleware' => [
$this->middleware => [
'enabled' => env('FIREWALL_MIDDLEWARE_' . strtoupper($this->middleware) . '_ENABLED', env('FIREWALL_ENABLED', true)),
'enabled' => env('FIREWALL_MIDDLEWARE_' . strtoupper($this->middleware) . '_ENABLED', Config::get('firewall.enabled', true)),
'methods' => ['post'],