2 Test imap_fetch_overview() function : usage variations - $msg_no argument
5 require_once(dirname(__FILE__).'/skipif.inc');
9 /* Prototype : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options])
10 * Description: Read an overview of the information in the headers
11 * of the given message sequence
12 * Source code: ext/imap/php_imap.c
16 * Pass different sequences/msg numbers as $msg_no argument to test behaviour
17 * of imap_fetch_overview()
20 echo "*** Testing imap_fetch_overview() : usage variations ***\n";
21 require_once(dirname(__FILE__).'/imap_include.inc');
23 $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs
25 $sequences = array (0, 4, '4', // out of range
27 '1:3'); // pass uid without setting FT_UID option
29 foreach($sequences as $msg_no) {
30 echo "\n-- \$msg_no is $msg_no --\n";
31 $overview = imap_fetch_overview($stream_id, $msg_no);
33 echo imap_last_error() . "\n";
35 foreach($overview as $ov) {
37 displayOverviewFields($ov);
48 require_once(dirname(__FILE__).'/clean.inc');
51 *** Testing imap_fetch_overview() : usage variations ***
52 Create a temporary mailbox and add 3 msgs
53 .. mailbox '{%s}%s' created
101 -- $msg_no is 1, 2 --
102 Syntax error in sequence