1--TEST--
2Test imap_mail_move() function : basic functionality
3--CREDITS--
4Olivier Doucet
5--SKIPIF--
6<?php
7require_once(dirname(__FILE__).'/skipif.inc');
8?>
9--FILE--
10<?php
11/* Prototype  : bool imap_mail_move  ( 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 */
15
16echo "*** Testing imap_mail_move() : basic functionality ***\n";
17
18require_once(dirname(__FILE__).'/imap_include.inc');
19
20
21echo "Create a new mailbox for test\n";
22$imap_stream = setup_test_mailbox("", 1);
23if (!is_resource($imap_stream)) {
24	exit("TEST FAILED: Unable to create test mailbox\n");
25}
26
27$check = imap_check($imap_stream);
28echo "Msg Count in new mailbox: ". $check->Nmsgs . "\n";
29
30var_dump(imap_mail_move($imap_stream, '1', 'INBOX.'.$mailbox_prefix));
31
32imap_close($imap_stream);
33?>
34===Done===
35--CLEAN--
36<?php
37require_once('clean.inc');
38?>
39--EXPECTF--
40*** Testing imap_mail_move() : basic functionality ***
41Create a new mailbox for test
42Create a temporary mailbox and add 1 msgs
43.. mailbox '%s' created
44Msg Count in new mailbox: 1
45bool(true)
46===Done===