1--TEST--
2imap_renamemailbox() function : basic functionality
3--CREDITS--
4Olivier Doucet
5--SKIPIF--
6<?php
7require_once(__DIR__.'/setup/skipif.inc');
8?>
9--FILE--
10<?php
11
12require_once(__DIR__.'/setup/imap_include.inc');
13
14$stream_id = setup_test_mailbox('imaprenamemailbox1', 1);
15
16$mailboxBaseName = IMAP_DEFAULT_MAILBOX . '.' . IMAP_MAILBOX_PHPT_PREFIX;
17
18//commented because of bug #49901
19//$ancError = error_reporting(0);
20//$z = imap_renamemailbox($stream_id, $newbox.'not2', $newbox.'2');
21//var_dump($z);
22//error_reporting($ancError);
23echo "Checking OK\n";
24
25var_dump(imap_renamemailbox($stream_id, $mailboxBaseName . 'imaprenamemailbox1', $mailboxBaseName . 'imaprenamemailbox2'));
26
27imap_close($stream_id);
28?>
29--CLEAN--
30<?php
31$mailbox_suffix = ['imaprenamemailbox1', 'imaprenamemailbox2'];
32require_once('setup/clean.inc');
33?>
34--EXPECT--
35Create a temporary mailbox and add 1 msgs
36New mailbox created
37Checking OK
38bool(true)
39