1--TEST-- 2imap_setflag_full() basic test 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("imapsetflagfullbasic", 10); 13 14// Testing individual entry 15imap_setflag_full($imap_mail_box, '1', '\Answered'); 16 17// Testing multiple entries entry 18imap_setflag_full($imap_mail_box, '2,7', '\Deleted'); 19 20// Testing entry range 21imap_setflag_full($imap_mail_box, '3:5', '\Flagged'); 22 23echo 'ALL: '; 24var_dump(imap_search($imap_mail_box, 'ALL')); 25echo 'ANSWERED: '; 26var_dump(imap_search($imap_mail_box, 'ANSWERED')); 27echo 'DELETED: '; 28var_dump(imap_search($imap_mail_box, 'DELETED')); 29echo 'FLAGGED: '; 30var_dump(imap_search($imap_mail_box, 'FLAGGED')); 31 32imap_close($imap_mail_box); 33 34?> 35--CLEAN-- 36<?php 37$mailbox_suffix = 'imapsetflagfullbasic'; 38require_once(__DIR__ . '/setup/clean.inc'); 39?> 40--EXPECT-- 41Create a temporary mailbox and add 10 msgs 42New mailbox created 43ALL: array(10) { 44 [0]=> 45 int(1) 46 [1]=> 47 int(2) 48 [2]=> 49 int(3) 50 [3]=> 51 int(4) 52 [4]=> 53 int(5) 54 [5]=> 55 int(6) 56 [6]=> 57 int(7) 58 [7]=> 59 int(8) 60 [8]=> 61 int(9) 62 [9]=> 63 int(10) 64} 65ANSWERED: array(1) { 66 [0]=> 67 int(1) 68} 69DELETED: array(2) { 70 [0]=> 71 int(2) 72 [1]=> 73 int(7) 74} 75FLAGGED: array(3) { 76 [0]=> 77 int(3) 78 [1]=> 79 int(4) 80 [2]=> 81 int(5) 82} 83