Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / imap / tests / imap_mail_copy_basic.phpt
bloba7b9421e31da0e53556f9a3dcca6e31893cd61dc
1 --TEST--
2 Test imap_mail_copy() function : basic functionality 
3 --CREDITS--
4 Olivier Doucet
5 --SKIPIF--
6 <?php
7 require_once(dirname(__FILE__).'/skipif.inc');
8 ?>
9 --FILE--
10 <?php
11 /* Prototype  : bool imap_mail_copy  ( resource $imap_stream  , string $msglist  , string $mailbox  [, int $options = 0  ] )
12  * Description: Copies mail messages specified by msglist  to specified mailbox. 
13  * Source code: ext/imap/php_imap.c
14  */
16 echo "*** Testing imap_mail_copy() : basic functionality ***\n";
18 require_once(dirname(__FILE__).'/imap_include.inc');
21 echo "Create a new mailbox for test\n";
22 $imap_stream = setup_test_mailbox("", 1);
23 if (!is_resource($imap_stream)) {
24         exit("TEST FAILED: Unable to create test mailbox\n");
27 $check = imap_check($imap_stream);
28 echo "Msg Count in new mailbox: ". $check->Nmsgs . "\n";    
30 var_dump(imap_mail_copy($imap_stream, '1', 'INBOX.'.$mailbox_prefix));
32 imap_close($imap_stream);
34 ===Done===
35 --CLEAN--
36 <?php 
37 require_once('clean.inc');
39 --EXPECTF--
40 *** Testing imap_mail_copy() : basic functionality ***
41 Create a new mailbox for test
42 Create a temporary mailbox and add 1 msgs
43 .. mailbox '%s' created
44 Msg Count in new mailbox: 1
45 bool(true)
46 ===Done===