?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_body();
-echo "Checking with incorrect parameter type\n";
-imap_body('');
-imap_body(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = imap_open($default_mailbox, $username, $password) or
die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
-imap_body($stream_id);
+
imap_body($stream_id,-1);
imap_body($stream_id,1,-1);
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_body() expects at least 2 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d
-
Warning: imap_body(): Bad message number in %s on line %d
Warning: imap_body(): Invalid value for the options parameter in %s on line %d
Testing with option value:bool(true)
imap_fetch_overview() returns an object
-Testing with option value:float(1)
+Testing with option value:float(1.000000000000001)
imap_fetch_overview() returns an object
Testing with option value:float(1)
$stream_id = setup_test_mailbox('', 3); // set up temp mailbox with simple msgs
$section = 1;
-$sequences = array (0, 4, // out of range
- '1,3', '1:3', // message sequences instead of numbers
- );
+$sequences = [0, /* out of range */ 4, 1];
foreach($sequences as $msg_no) {
echo "\n-- \$msg_no is $msg_no --\n";
bool(false)
--- $msg_no is 1,3 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(%d) "1: this is a test message, please ignore%a"
-
--- $msg_no is 1:3 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(%d) "1: this is a test message, please ignore%a"
+-- $msg_no is 1 --
+string(42) "1: this is a test message, please ignore
+"
$stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs
-$sequences = array (0, 4, // out of range
- '1,3', '1:3', // message sequences instead of numbers
- );
+$sequences = [0, /* out of range */ 4, 1];
foreach($sequences as $msg_no) {
echo "\n-- \$msg_no is $msg_no --\n";
bool(false)
--- $msg_no is 1,3 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(%d) "From: foo@anywhere.com
-Subject: Test msg 1
-To: %s
-MIME-Version: 1.0
-Content-Type: MULTIPART/mixed; BOUNDARY="%s"
-
-"
-
--- $msg_no is 1:3 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
+-- $msg_no is 1 --
string(%d) "From: foo@anywhere.com
Subject: Test msg 1
-To: %s
+To: webmaster@something.com
MIME-Version: 1.0
-Content-Type: MULTIPART/mixed; BOUNDARY="%s"
+Content-Type: MULTIPART/mixed; BOUNDARY="%s=:%d"
"
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_fetchstructure();
-
-echo "Checking with incorrect parameter type\n";
-imap_fetchstructure('');
-imap_fetchstructure(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = setup_test_mailbox('', 1);
-imap_fetchstructure($stream_id);
imap_fetchstructure($stream_id,0);
$z = imap_fetchstructure($stream_id,1);
require_once('clean.inc');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
Create a temporary mailbox and add 1 msgs
-.. mailbox '{%s}%s' created
-
-Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
+.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
bool(true)
bool(true)
bool(true)
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_gc();
-
-echo "Checking with incorrect parameter type\n";
-imap_gc('', false);
-imap_gc(false, false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = imap_open($default_mailbox, $username, $password) or
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_gc() Expects exactly 2 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_gc(): Argument #1 must be of type resource, string given in %s on line %d
-
-Warning: imap_gc(): Argument #1 must be of type resource, bool given in %s on line %d
-
Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_getsubscribed();
-
-echo "Checking with incorrect parameter type\n";
-imap_getsubscribed('');
-imap_getsubscribed(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = imap_open($default_mailbox, $username, $password) or
die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
-imap_getsubscribed($stream_id);
-imap_getsubscribed($stream_id,$default_mailbox);
var_dump(imap_getsubscribed($stream_id,$default_mailbox,'ezDvfXvbvcxSerz'));
require_once('clean.inc');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_getsubscribed() expects exactly 3 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_getsubscribed() expects exactly 3 parameters, 2 given in %s on line %d
bool(false)
Checking OK
bool(true)
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_list();
-
-echo "Checking with incorrect parameter type\n";
-imap_list('');
-imap_list(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = imap_open($default_mailbox, $username, $password) or
die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
-imap_list($stream_id);
-imap_list($stream_id,$default_mailbox);
imap_list($stream_id,$default_mailbox,'ezerz');
imap_close($stream_id);
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_list() expects exactly 3 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_list() expects exactly 3 parameters, 2 given in %s on line %d
bool(true)
string(%s) "{%s}%s"
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_lsub();
-
-echo "Checking with incorrect parameter type\n";
-imap_lsub('');
-imap_lsub(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = imap_open($default_mailbox, $username, $password) or
die("Cannot connect to mailbox $default_mailbox: " . imap_last_error());
-imap_lsub($stream_id);
-imap_lsub($stream_id,$default_mailbox);
var_dump(imap_lsub($stream_id,$default_mailbox,'ezDvfXvbvcxSerz'));
require_once('clean.inc');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_lsub() expects exactly 3 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_lsub() expects exactly 3 parameters, 2 given in %s on line %d
bool(false)
Checking OK
bool(true)
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_open();
-imap_open(false);
-imap_open(false, false);
-imap_open('');
-imap_open('', '');
echo "Checking with incorrect parameters\n" ;
imap_open('', '', '');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_open() expects at least 3 parameters, 0 given in %s on line %d
-
-Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d
-
-Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d
-
-Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d
-
-Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d
Checking with incorrect parameters
Warning: imap_open(): Couldn't open stream in %s on line %d
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_renamemailbox();
-
-echo "Checking with incorrect parameter type\n";
-imap_renamemailbox('');
-imap_renamemailbox(false);
-
require_once(__DIR__.'/imap_include.inc');
$newbox = $default_mailbox . "." . $mailbox_prefix;
-imap_renamemailbox($stream_id, $newbox.'not');
-imap_renamemailbox($stream_id, $newbox);
-
//commented because of bug #49901
//$ancError = error_reporting(0);
//$z = imap_renamemailbox($stream_id, $newbox.'not2', $newbox.'2');
require_once('clean.inc');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_renamemailbox() expects exactly 3 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_renamemailbox() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: imap_renamemailbox() expects exactly 3 parameters, 1 given in %s on line %d
Create a temporary mailbox and add 1 msgs
.. mailbox '{%s}%s' created
-
-Warning: imap_renamemailbox() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: imap_renamemailbox() expects exactly 3 parameters, 2 given in %s on line %d
Checking OK
bool(true)
bool(true)
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_savebody();
-
-echo "Checking with incorrect parameter type\n";
-imap_savebody('');
-imap_savebody(false);
require_once(__DIR__.'/imap_include.inc');
$stream_id = setup_test_mailbox('', 1);
-imap_savebody($stream_id);
-
$file = __DIR__.'/tmpsavebody.txt';
//with URL
require_once('clean.inc');
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_savebody() expects at least 3 parameters, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d
-
-Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d
Create a temporary mailbox and add 1 msgs
-.. mailbox '{%s}%s' created
-
-Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d
+.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
bool(true)
Size: %d
bool(true)
?>
--FILE--
<?php
-echo "Checking with no parameters\n";
-imap_timeout();
-
-echo "Checking with incorrect parameter type\n";
-imap_timeout('');
-imap_timeout(false);
echo "GET values:\n";
var_dump(imap_timeout(IMAP_OPENTIMEOUT));
?>
--EXPECTF--
-Checking with no parameters
-
-Warning: imap_timeout() expects at least 1 argument, 0 given in %s on line %d
-Checking with incorrect parameter type
-
-Warning: imap_timeout(): Argument #1 must be of type int, %s given in %s on line %d
GET values:
int(%d)
int(%d)