1--TEST-- 2imap_savebody() passing a unique ID 3--EXTENSIONS-- 4imap 5--SKIPIF-- 6<?php 7require_once(__DIR__.'/setup/skipif.inc'); 8?> 9--FILE-- 10<?php 11 12require_once(__DIR__.'/setup/imap_include.inc'); 13 14$imap_mail_box = setup_test_mailbox_for_uid_tests("imapsavebodyuid", $msg_no, $uid); 15 16$section = ''; 17 18$stream_uid = fopen('php://memory', 'w+'); 19imap_savebody($imap_mail_box, $stream_uid, $uid, $section, FT_UID); 20 21$stream_msg_no = fopen('php://memory', 'w+'); 22imap_savebody($imap_mail_box, $stream_msg_no, $msg_no, $section); 23 24// Compare what was written. 25rewind($stream_uid); 26rewind($stream_msg_no); 27var_dump(stream_get_contents($stream_uid) === stream_get_contents($stream_msg_no)); 28 29imap_close($imap_mail_box); 30 31?> 32--CLEAN-- 33<?php 34$mailbox_suffix = 'imapsavebodyuid'; 35require_once(__DIR__ . '/setup/clean.inc'); 36?> 37--EXPECT-- 38Create a temporary mailbox and add 10 msgs 39New mailbox created 40Delete 4 messages for Unique ID generation 41bool(true) 42