From 06a8ee12152e8ec95c5e301ca375c8eafb97b01a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 1 Jun 2020 17:04:07 +1000 Subject: [PATCH] Fix throttling with tests --- tests/Feature/PaymentTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Feature/PaymentTest.php b/tests/Feature/PaymentTest.php index 70b8a4c4da3d..8963494ce2cd 100644 --- a/tests/Feature/PaymentTest.php +++ b/tests/Feature/PaymentTest.php @@ -21,6 +21,7 @@ use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\WithoutEvents; +use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Session; use Illuminate\Validation\ValidationException; @@ -43,10 +44,6 @@ class PaymentTest extends TestCase { parent::setUp(); - $this->withoutMiddleware( - ThrottleRequests::class - ); - Session::start(); $this->faker = \Faker\Factory::create(); @@ -55,6 +52,10 @@ class PaymentTest extends TestCase $this->makeTestData(); $this->withoutExceptionHandling(); + + $this->withoutMiddleware( + ThrottleRequests::class + ); } public function testPaymentList()