1--TEST-- 2imap_setflag_full() 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("imapsetflagfulluid"); 13 14/* This works on the assumption that UID message 3 to 6 inclusive are deleted. */ 15 16// Testing individual entry 17imap_setflag_full($imap_mail_box, '8', '\Answered', ST_UID); 18 19// Testing multiple entries entry 20imap_setflag_full($imap_mail_box, '7,10', '\Deleted', ST_UID); 21 22// Testing entry range 23imap_setflag_full($imap_mail_box, '7:9', '\Flagged', ST_UID); 24 25// Testing entry range invalid 26var_dump(imap_setflag_full($imap_mail_box, '4:9', '\Seen', ST_UID)); 27 28 29echo 'ALL: '; 30var_dump(imap_search($imap_mail_box, 'ALL')); 31echo 'ALL (with UID correspondance): '; 32var_dump(imap_search($imap_mail_box, 'ALL', SE_UID)); 33echo 'ANSWERED: '; 34var_dump(imap_search($imap_mail_box, 'ANSWERED')); 35echo 'DELETED: '; 36var_dump(imap_search($imap_mail_box, 'DELETED')); 37echo 'FLAGGED: '; 38var_dump(imap_search($imap_mail_box, 'FLAGGED')); 39echo 'SEEN: '; 40var_dump(imap_search($imap_mail_box, 'SEEN')); 41 42imap_close($imap_mail_box); 43 44?> 45--CLEAN-- 46<?php 47$mailbox_suffix = 'imapsetflagfulluid'; 48require_once(__DIR__ . '/setup/clean.inc'); 49?> 50--EXPECT-- 51Create a temporary mailbox and add 10 msgs 52New mailbox created 53Delete 4 messages for Unique ID generation 54bool(true) 55ALL: array(6) { 56 [0]=> 57 int(1) 58 [1]=> 59 int(2) 60 [2]=> 61 int(3) 62 [3]=> 63 int(4) 64 [4]=> 65 int(5) 66 [5]=> 67 int(6) 68} 69ALL (with UID correspondance): array(6) { 70 [0]=> 71 int(1) 72 [1]=> 73 int(2) 74 [2]=> 75 int(7) 76 [3]=> 77 int(8) 78 [4]=> 79 int(9) 80 [5]=> 81 int(10) 82} 83ANSWERED: array(1) { 84 [0]=> 85 int(4) 86} 87DELETED: array(2) { 88 [0]=> 89 int(3) 90 [1]=> 91 int(6) 92} 93FLAGGED: array(3) { 94 [0]=> 95 int(3) 96 [1]=> 97 int(4) 98 [2]=> 99 int(5) 100} 101SEEN: array(3) { 102 [0]=> 103 int(3) 104 [1]=> 105 int(4) 106 [2]=> 107 int(5) 108} 109