diff options
Diffstat (limited to 'ext/sockets/tests/socket_set_nonblock-wrongparams.phpt')
-rw-r--r-- | ext/sockets/tests/socket_set_nonblock-wrongparams.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/sockets/tests/socket_set_nonblock-wrongparams.phpt b/ext/sockets/tests/socket_set_nonblock-wrongparams.phpt new file mode 100644 index 0000000..4b7e5be --- /dev/null +++ b/ext/sockets/tests/socket_set_nonblock-wrongparams.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test if socket_set_nonblock throws E_WARNING with wrong parameters. +--SKIPIF-- +<?php +if (!extension_loaded('sockets')) { + die('SKIP The sockets extension is not loaded.'); +} +--FILE-- +<?php +$socket = socket_set_nonblock(array()); +?> +--EXPECTF-- +Warning: socket_set_nonblock() expects parameter 1 to be resource, array given in %s on line %d |