11--TEST--
2- Test imap_errors() function : basic functionality
2+ Test imap_errors() function : invalid password
33--SKIPIF--
44<?php
55require_once (__DIR__ .'/skipif.inc ' );
66?>
77--FILE--
88<?php
9- echo "*** Testing imap_errors() : basic functionality *** \n" ;
9+ echo "*** Testing imap_errors() : invalid password *** \n" ;
1010require_once (__DIR__ .'/imap_include.inc ' );
1111$ password = "bogus " ; // invalid password to use in this test
1212
13- echo "Issue open with invalid password with normal default number of retries, i.e 3 \n" ;
14- $ mbox = imap_open ($ default_mailbox , $ username , $ password , OP_READONLY , 3 );
15-
16- echo "List any errors \n" ;
17- var_dump (imap_errors ());
18-
19- echo "\n\nIssue open with invalid password with retries == 1 \n" ;
13+ echo "Issue opening with invalid password, 1 retry \n" ;
2014$ mbox = imap_open ($ default_mailbox , $ username , $ password , OP_READONLY , 1 );
2115
2216echo "List any errors \n" ;
2317var_dump (imap_errors ());
18+
2419?>
2520--EXPECTF--
26- *** Testing imap_errors() : basic functionality ***
27- Issue open with invalid password with normal default number of retries, i.e 3
21+ *** Testing imap_errors() : invalid password ***
22+ Issue opening with invalid password, 1 retry
2823
2924Warning: imap_open(): Couldn't open stream %s in %s on line %d
3025List any errors
@@ -33,16 +28,4 @@ array(%d) {
3328 string(%d) "%s"
3429 [1]=>
3530 string(%d) "%s"
36- [2]=>
37- string(%d) "%a
38- }
39-
40-
41- Issue open with invalid password with retries == 1
42-
43- Warning: imap_open(): Couldn't open stream %s in %s on line %d
44- List any errors
45- array(%d) {
46- [0]=>
47- string(%d) "%a
4831}
0 commit comments