Skip to content

Commit 06b1200

Browse files
committed
adds test
1 parent 3eced3c commit 06b1200

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Support/SupportFacadesHttpTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,15 @@ public function testFacadeRootIsSharedWhenEnforcingFaking(): void
5555

5656
$this->assertSame($client, $this->app->make(Factory::class));
5757
}
58+
59+
public function test_can_set_prevents_to_prevents_stray_requests(): void
60+
{
61+
Http::preventStrayRequests(true);
62+
$this->assertTrue($this->app->make(Factory::class)->preventingStrayRequests());
63+
$this->assertTrue(Http::preventingStrayRequests());
64+
65+
Http::preventStrayRequests(false);
66+
$this->assertFalse($this->app->make(Factory::class)->preventingStrayRequests());
67+
$this->assertFalse(Http::preventingStrayRequests());
68+
}
5869
}

0 commit comments

Comments
 (0)