Annotation of embedaddon/php/ext/sockets/tests/socket_listen-wrongparams.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Test parameter handling in socket_listen().
3: --SKIPIF--
4: <?php
1.1.1.2 ! misho 5: if (substr(PHP_OS, 0, 3) == 'WIN') {
! 6: die('skip.. Not valid for Windows');
! 7: }
1.1 misho 8: if (!extension_loaded('sockets')) {
9: die('SKIP The sockets extension is not loaded.');
10: }
11: --FILE--
12: <?php
13: var_dump(socket_listen(null));
14: $socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
15: var_dump(socket_listen($socket));
16: --EXPECTF--
17: Warning: socket_listen() expects parameter 1 to be resource, null given in %s on line %d
18: NULL
19:
20: Warning: socket_listen(): unable to listen on socket [%d]: Invalid argument in %s on line %d
21: bool(false)
22: --CREDITS--
23: Till Klampaeckel, till@php.net
24: Berlin TestFest 2009
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>