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