Annotation of embedaddon/php/ext/sysvmsg/tests/002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: msg_receive() should return false when unserialize() failed
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extenions is not available")?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $queue = msg_get_queue (ftok(__FILE__, 'r'), 0600);
! 9: if (!msg_send ($queue, 1, 'Hi', false /* ! no_ser*/, true/*block*/, $msg_err)) {
! 10: die("error\n");
! 11: }
! 12: var_dump($res = msg_receive ($queue, 1, $msg_type, 16384, $msg, true, 0, $msg_error));
! 13:
! 14: if (!msg_remove_queue($queue)) {
! 15: echo "BAD: queue removal failed\n";
! 16: }
! 17:
! 18: echo "Done\n";
! 19: ?>
! 20: --EXPECTF--
! 21: Warning: msg_receive(): message corrupted in %s002.php on line %d
! 22: bool(false)
! 23: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>