xref: /PHP-8.0/ext/imap/tests/imap_sort_uid.phpt (revision e45cc31c)
1--TEST--
2imap_sort() basics
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("imapsortbasic");
13
14var_dump(imap_sort($imap_mail_box, SORTSUBJECT, 0));
15var_dump(imap_sort($imap_mail_box, SORTSUBJECT, 0, SE_UID));
16
17imap_close($imap_mail_box);
18
19?>
20--CLEAN--
21<?php
22$mailbox_suffix = 'imapsortbasic';
23require_once(__DIR__ . '/setup/clean.inc');
24?>
25--EXPECT--
26Create a temporary mailbox and add 10 msgs
27New mailbox created
28Delete 4 messages for Unique ID generation
29array(6) {
30  [0]=>
31  int(1)
32  [1]=>
33  int(6)
34  [2]=>
35  int(2)
36  [3]=>
37  int(3)
38  [4]=>
39  int(4)
40  [5]=>
41  int(5)
42}
43array(6) {
44  [0]=>
45  int(1)
46  [1]=>
47  int(10)
48  [2]=>
49  int(2)
50  [3]=>
51  int(7)
52  [4]=>
53  int(8)
54  [5]=>
55  int(9)
56}
57