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