From 0cffdf4c767d564cf7a76a611cef5e0e9f8efdd4 Mon Sep 17 00:00:00 2001 From: Luke Kuzmish Date: Fri, 20 Dec 2024 08:05:39 -0500 Subject: [PATCH] adds test --- tests/Support/SupportFacadesHttpTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Support/SupportFacadesHttpTest.php b/tests/Support/SupportFacadesHttpTest.php index fe194d0350d7..f28cb85dd98a 100644 --- a/tests/Support/SupportFacadesHttpTest.php +++ b/tests/Support/SupportFacadesHttpTest.php @@ -55,4 +55,13 @@ public function testFacadeRootIsSharedWhenEnforcingFaking(): void $this->assertSame($client, $this->app->make(Factory::class)); } + + public function test_can_set_prevents_to_prevents_stray_requests(): void + { + Http::preventStrayRequests(true); + $this->assertTrue($this->app->make(Factory::class)->preventingStrayRequests()); + + Http::preventStrayRequests(false); + $this->assertFalse($this->app->make(Factory::class)->preventingStrayRequests()); + } }