xref: /PHP-5.5/ext/imap/tests/imap_list_basic.phpt (revision db8c6d5d)
1--TEST--
2imap_list() function : basic functionality
3--CREDITS--
4Olivier Doucet
5--SKIPIF--
6<?php
7require_once(dirname(__FILE__).'/skipif.inc');
8?>
9--FILE--
10<?php
11echo "Checking with no parameters\n";
12imap_list();
13
14echo  "Checking with incorrect parameter type\n";
15imap_list('');
16imap_list(false);
17
18require_once(dirname(__FILE__).'/imap_include.inc');
19$stream_id = imap_open($default_mailbox, $username, $password) or
20	die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
21
22imap_list($stream_id);
23imap_list($stream_id,$default_mailbox);
24imap_list($stream_id,$default_mailbox,'ezerz');
25
26
27$z = imap_list($stream_id,$default_mailbox,'*');
28var_dump(is_array($z));
29var_dump($z[0]);
30
31imap_close($stream_id);
32?>
33--EXPECTF--
34Checking with no parameters
35
36Warning: imap_list() expects exactly 3 parameters, 0 given in %s on line %d
37Checking with incorrect parameter type
38
39Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
40
41Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
42
43Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
44
45Warning: imap_list() expects exactly 3 parameters, 2 given in %s on line %d
46bool(true)
47string(%s) "{%s}%s"