1
1
--TEST--
2
- Test imap_errors() function : basic functionality
2
+ Test imap_errors() function : invalid password
3
3
--SKIPIF--
4
4
<?php
5
5
require_once (__DIR__ .'/skipif.inc ' );
6
6
?>
7
7
--FILE--
8
8
<?php
9
- echo "*** Testing imap_errors() : basic functionality *** \n" ;
9
+ echo "*** Testing imap_errors() : invalid password *** \n" ;
10
10
require_once (__DIR__ .'/imap_include.inc ' );
11
11
$ password = "bogus " ; // invalid password to use in this test
12
12
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" ;
20
14
$ mbox = imap_open ($ default_mailbox , $ username , $ password , OP_READONLY , 1 );
21
15
22
16
echo "List any errors \n" ;
23
17
var_dump (imap_errors ());
18
+
24
19
?>
25
20
--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
28
23
29
24
Warning: imap_open(): Couldn't open stream %s in %s on line %d
30
25
List any errors
@@ -33,16 +28,4 @@ array(%d) {
33
28
string(%d) "%s"
34
29
[1]=>
35
30
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
48
31
}
0 commit comments