From 30cd08a183d4b2cf325dd83a5c69939b58723b5a Mon Sep 17 00:00:00 2001 From: Tony Messias Date: Tue, 17 Dec 2024 22:56:59 -0300 Subject: [PATCH] Rename method --- tests/Feature/EnvironmentTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/EnvironmentTest.php b/tests/Feature/EnvironmentTest.php index 68ab6fc..7d0422a 100644 --- a/tests/Feature/EnvironmentTest.php +++ b/tests/Feature/EnvironmentTest.php @@ -25,12 +25,12 @@ public function it_detects_a_port_conflict() $environment = app(Environment::class); $this->assertTrue($environment->portIsAvailable($port)); - $this->withFakeProcess($port, fn() => ( + $this->bindFakeProcessToPort($port, fn() => ( $this->assertFalse($environment->portIsAvailable($port), "Expected port {$port} to be in use, but it was available.") )); } - private function withFakeProcess(int $port, $callback) + private function bindFakeProcessToPort(int $port, $callback) { $socket = socket_create(domain: AF_INET, type: SOCK_STREAM, protocol: SOL_TCP); assert($socket !== false, 'Was not able to create a socket.');