diff --git a/tests/Support/SupportFacadesHttpTest.php b/tests/Support/SupportFacadesHttpTest.php index fe194d0350d..f28cb85dd98 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()); + } }