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