All pastes #1286949 Raw Edit

Anonymous

public text v1 · immutable
#1286949 ·published 2008-12-16 17:23 UTC
rendered paste body
--TEST--
Test imap_fetchstructure() function : basic functionality 
--SKIPIF--
<?php
require_once(dirname(__FILE__).'/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__).'/imap_include.inc');

$stream_id = setup_test_mailbox('', 1, $mailbox, 'notSimple'); // set up temp mailbox with 1 msg
$msg_no = 1;
$msg_uid = imap_uid($stream_id, 1);

if (is_object(imap_fetchstructure($stream_id, $msg_uid, FT_UID) ) ) {echo "PASS\n";}
if (is_object(imap_fetchstructure($stream_id, $msg_uid, PHP_INT_MAX) ) ) {echo "PASS\n";}
if (is_object(imap_fetchstructure($stream_id, $msg_uid) ) ) {echo "PASS\n";}

?>
===DONE===
--CLEAN--
<?php
require_once(dirname(__FILE__).'/clean.inc');
?>
--EXPECTF--
Create a temporary mailbox and add 1 msgs
.. mailbox '{localhost/norsh}INBOX.phpttest' created
PASS

Warning: imap_fetchstructure(): invalid value for the options parameter in %s on line 10
PASS
===DONE===