Annotation of embedaddon/php/ext/imap/tests/imap_mail_copy.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test imap_mail_copy() incorrect parameters
3: --CREDITS--
4: Olivier Doucet
5: --SKIPIF--
6: <?php
7: require_once(dirname(__FILE__).'/skipif.inc');
8: ?>
9: --FILE--
10: <?php
11: echo "Checking with no parameters\n";
12: imap_mail_copy();
13:
14:
15: echo "Checking with incorrect parameter type\n";
16: imap_mail_copy('');
17: imap_mail_copy(false);
18:
19:
20: // more tests
21: require_once(dirname(__FILE__).'/imap_include.inc');
22:
23:
24: echo "Test with IMAP server\n";
25: $stream_id = imap_open($default_mailbox, $username, $password) or
26: die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
27:
28: var_dump(imap_mail_copy($stream_id));
29: var_dump(imap_mail_copy($stream_id,-1));
30: var_dump(imap_mail_copy($stream_id, ''));
31:
32: imap_close($stream_id);
33: ?>
34: ===Done===
35: --EXPECTF--
36: Checking with no parameters
37:
38: Warning: imap_mail_copy() expects at least 3 parameters, 0 given in %s on line %d
39: Checking with incorrect parameter type
40:
41: Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d
42:
43: Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d
44: Test with IMAP server
45:
46: Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d
47: NULL
48:
49: Warning: imap_mail_copy() expects at least 3 parameters, 2 given in %s on line %d
50: NULL
51:
52: Warning: imap_mail_copy() expects at least 3 parameters, 2 given in %s on line %d
53: NULL
54: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>