Annotation of embedaddon/php/ext/imap/tests/imap_open_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: imap_open() incorrect parameter count
3: --CREDITS--
4: Paul Sohier
5: #phptestfest utrecht
6: --SKIPIF--
7: <?php
8: require_once(dirname(__FILE__).'/skipif.inc');
9: ?>
10: --FILE--
11: <?php
12: echo "Checking with no parameters\n";
13: imap_open();
14: imap_open(false);
15: imap_open(false, false);
16: imap_open('');
17: imap_open('', '');
18:
19: echo "Checking with incorrect parameters\n" ;
20: imap_open('', '', '');
21: imap_open('', '', '', -1);
22:
23: require_once(dirname(__FILE__).'/imap_include.inc');
24: imap_open($default_mailbox, $username, $password, NIL, -1);
25:
26: ?>
27: --EXPECTF--
28: Checking with no parameters
29:
30: Warning: imap_open() expects at least 3 parameters, 0 given in %s on line %d
31:
32: Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d
33:
34: Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d
35:
36: Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d
37:
38: Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d
39: Checking with incorrect parameters
40:
41: Warning: imap_open(): Couldn't open stream in %s on line %d
42:
43: Warning: imap_open(): Couldn't open stream in %s on line %d
44:
45: Warning: imap_open(): Retries must be greater or equal to 0 in %s on line %d
46:
47: Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>