From 0673d0de35f976846408d64d005d45f2aec9c952 Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Mon, 2 Dec 2024 17:36:07 +0100 Subject: [PATCH] Prevent stray requests in unit tests --- phpunit.xml | 1 + tests/TestCase.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/phpunit.xml b/phpunit.xml index a199dcf3..e9a25f46 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -38,5 +38,6 @@ + diff --git a/tests/TestCase.php b/tests/TestCase.php index 54f86be5..cc158eca 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -11,6 +11,7 @@ use Illuminate\Database\Eloquent\Collection; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Support\Carbon; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Storage; use Mockery\MockInterface; @@ -25,6 +26,7 @@ protected function setUp(): void parent::setUp(); Mail::fake(); LogFake::bind(); + Http::preventStrayRequests(); $this->actAsOrganizationWithoutSubscriptionAndWithoutTrial(); // Note: The following line can be used to test timezone edge cases. // $this->travelTo(Carbon::now()->timezone('Europe/Vienna')->setHour(0)->setMinute(59)->setSecond(0));