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