xref: /PHP-8.2/ext/imap/tests/imap_list_basic.phpt (revision b5a14e6c)
1--TEST--
2imap_list() function : basic functionality
3--CREDITS--
4Olivier Doucet
5--EXTENSIONS--
6imap
7--SKIPIF--
8<?php
9require_once(__DIR__.'/setup/skipif.inc');
10?>
11--FILE--
12<?php
13
14require_once(__DIR__.'/setup/imap_include.inc');
15$stream_id = imap_open(IMAP_DEFAULT_MAILBOX, IMAP_MAILBOX_USERNAME, IMAP_MAILBOX_PASSWORD) or
16    die("Cannot connect to mailbox " .IMAP_DEFAULT_MAILBOX.": " . imap_last_error());
17
18imap_list($stream_id, IMAP_DEFAULT_MAILBOX,'ezerz');
19
20
21$z = imap_list($stream_id, IMAP_DEFAULT_MAILBOX,'*');
22var_dump(is_array($z));
23
24// e.g. "{127.0.0.1:143/norsh}INBOX"
25var_dump($z[0]);
26
27imap_close($stream_id);
28?>
29--EXPECTF--
30bool(true)
31string(%s) "{%s}%s"
32