1--TEST-- 2imap_body() incorrect parameter count 3--CREDITS-- 4Paul Sohier 5#phptestfest utrecht 6--SKIPIF-- 7<?php 8require_once(dirname(__FILE__).'/skipif.inc'); 9?> 10--FILE-- 11<?php 12echo "Checking with no parameters\n"; 13imap_body(); 14 15echo "Checking with incorrect parameter type\n"; 16imap_body(''); 17imap_body(false); 18require_once(dirname(__FILE__).'/imap_include.inc'); 19$stream_id = imap_open($default_mailbox, $username, $password) or 20 die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); 21imap_body($stream_id); 22imap_body($stream_id,-1); 23imap_body($stream_id,1,-1); 24 25//Access not existing 26var_dump(imap_body($stream_id, 999, FT_UID)); 27 28imap_close($stream_id); 29 30?> 31--EXPECTF-- 32Checking with no parameters 33 34Warning: imap_body() expects at least 2 parameters, 0 given in %s on line %d 35Checking with incorrect parameter type 36 37Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d 38 39Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d 40 41Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d 42 43Warning: imap_body(): Bad message number in %s on line %d 44 45Warning: imap_body(): invalid value for the options parameter in %s on line %d 46 47Warning: imap_body(): Bad message number in %s on line %d 48bool(false) 49