1--TEST-- 2imap_timeout() function : basic functionality 3--CREDITS-- 4Olivier Doucet 5--SKIPIF-- 6<?php 7require_once(dirname(__FILE__).'/skipif.inc'); 8?> 9--FILE-- 10<?php 11echo "Checking with no parameters\n"; 12imap_timeout(); 13 14echo "Checking with incorrect parameter type\n"; 15imap_timeout(''); 16imap_timeout(false); 17 18echo "GET values:\n"; 19var_dump(imap_timeout(IMAP_OPENTIMEOUT)); 20var_dump(imap_timeout(IMAP_READTIMEOUT)); 21var_dump(imap_timeout(IMAP_WRITETIMEOUT)); 22var_dump(imap_timeout(IMAP_CLOSETIMEOUT)); 23 24echo "SET values:\n"; 25var_dump(imap_timeout(IMAP_OPENTIMEOUT, 10)); 26var_dump(imap_timeout(IMAP_READTIMEOUT, 10)); 27var_dump(imap_timeout(IMAP_WRITETIMEOUT, 10)); 28 29//IMAP_CLOSETIMEOUT not implemented 30//var_dump(imap_timeout(IMAP_CLOSETIMEOUT, 10)); 31 32echo "CHECK values:\n"; 33var_dump(imap_timeout(IMAP_OPENTIMEOUT)); 34var_dump(imap_timeout(IMAP_READTIMEOUT)); 35var_dump(imap_timeout(IMAP_WRITETIMEOUT)); 36 37//IMAP_CLOSETIMEOUT not implemented 38//var_dump(imap_timeout(IMAP_CLOSETIMEOUT)); 39 40?> 41--EXPECTF-- 42Checking with no parameters 43 44Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d 45Checking with incorrect parameter type 46 47Warning: imap_timeout() expects parameter 1 to be integer, %s given in %s on line %d 48GET values: 49int(%d) 50int(%d) 51int(%d) 52int(%d) 53SET values: 54bool(true) 55bool(true) 56bool(true) 57CHECK values: 58int(10) 59int(10) 60int(10) 61