Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Dec 18, 2024
1 parent 87cc23c commit 30cd08a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Feature/EnvironmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit 30cd08a

Please sign in to comment.