Skip to content

Commit f008f36

Browse files
committed
Fix normalizing TNT_LISTEN_URI
1 parent 6ce6eca commit f008f36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Integration/TestCase.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ final protected function getClient() : Client
4141
return $this->client = Client::fromDefaults();
4242
}
4343

44-
if (0 === strpos($uri, '/') || 0 === strpos($uri, 'unix/:')) {
44+
if (0 === strpos($uri, '/')) {
45+
$dsn = 'unix://'.$uri;
46+
} elseif (0 === strpos($uri, 'unix/:')) {
4547
$dsn = 'unix://'.substr($uri, 6);
4648
} elseif (ctype_digit($uri)) {
47-
$dsn = "tcp://127.0.0.1:$uri";
49+
$dsn = 'tcp://127.0.0.1:'.$uri;
4850
} else {
49-
$dsn = "tcp://$uri";
51+
$dsn = 'tcp://'.$uri;
5052
}
5153

5254
return $this->client = Client::fromDsn($dsn);

0 commit comments

Comments
 (0)