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