Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / imap / tests / imap_errors_basic.phpt
blob91be3286aaeb87de2823e6e7037a373a8911069b
1 --TEST--
2 Test imap_errors() function : basic functionality 
3 --SKIPIF--
4 <?php 
5 require_once(dirname(__FILE__).'/skipif.inc');
6 ?>
7 --FILE--
8 <?php
9 /* Prototype  : array imap_errors  ( void  )
10  * Description: Returns all of the IMAP errors that have occurred.
11  * Source code: ext/imap/php_imap.c
12  */
14 echo "*** Testing imap_errors() : basic functionality ***\n";
15 require_once(dirname(__FILE__).'/imap_include.inc');
16 $password = "bogus"; // invalid password to use in this test 
18 echo "Issue open with invalid password with normal default number of retries, i.e 3\n";
19 $mbox = imap_open($default_mailbox, $username, $password, OP_READONLY, 3);
21 echo "List any errors\n";
22 var_dump(imap_errors()); 
24 echo "\n\nIssue open with invalid password with retries == 1\n";
25 $mbox = imap_open($default_mailbox, $username, $password, OP_READONLY, 1);
27 echo "List any errors\n";
28 var_dump(imap_errors()); 
30 ===Done===
31 --EXPECTF--
32 *** Testing imap_errors() : basic functionality ***
33 Issue open with invalid password with normal default number of retries, i.e 3
35 Warning: imap_open(): Couldn't open stream %s in %s on line %d
36 List any errors
37 array(%d) {
38   [0]=>
39   string(%d) "%s"
40   [1]=>
41   string(%d) "%s"
42   [2]=>
43   string(%d) "%a
47 Issue open with invalid password with retries == 1
49 Warning: imap_open(): Couldn't open stream %s in %s on line %d
50 List any errors
51 array(%d) {
52   [0]=>
53   string(%d) "%a
55 ===Done===