summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_connect_params.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/tests/socket_connect_params.phpt')
-rw-r--r--ext/sockets/tests/socket_connect_params.phpt7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt
index ea7c4971d1..608e5d1c2e 100644
--- a/ext/sockets/tests/socket_connect_params.phpt
+++ b/ext/sockets/tests/socket_connect_params.phpt
@@ -17,22 +17,21 @@ socket_getsockname($s_c, $addr, $port);
// wrong parameter count
try {
- $s_w = socket_connect($s_c);
+ socket_connect($s_c);
} catch (\ArgumentCountError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
- $s_w = socket_connect($s_c, '0.0.0.0');
+ socket_connect($s_c, '0.0.0.0');
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
$s_w = socket_connect($s_c, '0.0.0.0', $port);
socket_close($s_c);
-
?>
--EXPECTF--
socket_connect() expects at least 2 parameters, 1 given
-socket_connect(): Argument #3 ($port) must be specified for the AF_INET socket type
+socket_connect(): Argument #3 ($port) cannot be null when the socket type is AF_INET
Warning: socket_connect(): unable to connect [%i]: %a in %s on line %d