summaryrefslogtreecommitdiff
path: root/ext/imap/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-08 12:08:59 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-10-08 18:02:09 +0200
commite0f2ac9ff6c14914edd229432210928186e8e561 (patch)
treed895fe9f418ed5cc7b8dc91658fcba809b6d4721 /ext/imap/tests
parent5836e3ed97c906af1f2cecfffc0ea596a893d26f (diff)
downloadphp-git-e0f2ac9ff6c14914edd229432210928186e8e561.tar.gz
Update ext/imap parameter names
Closes GH-6299.
Diffstat (limited to 'ext/imap/tests')
-rw-r--r--ext/imap/tests/imap_body.phpt4
-rw-r--r--ext/imap/tests/imap_close_variation4.phpt10
-rw-r--r--ext/imap/tests/imap_fetch_overview_variation3.phpt8
-rw-r--r--ext/imap/tests/imap_fetchbody_variation4.phpt12
-rw-r--r--ext/imap/tests/imap_fetchbody_variation6.phpt18
-rw-r--r--ext/imap/tests/imap_fetchheader_variation3.phpt12
-rw-r--r--ext/imap/tests/imap_fetchheader_variation5.phpt18
-rw-r--r--ext/imap/tests/imap_fetchstructure_basic.phpt2
-rw-r--r--ext/imap/tests/imap_open_error.phpt4
9 files changed, 44 insertions, 44 deletions
diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt
index 752ca1c39d..6c2f629398 100644
--- a/ext/imap/tests/imap_body.phpt
+++ b/ext/imap/tests/imap_body.phpt
@@ -32,8 +32,8 @@ imap_close($stream_id);
?>
--EXPECTF--
-imap_body(): Argument #2 ($msg_no) must be greater than 0
-imap_body(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_body(): Argument #2 ($message_num) must be greater than 0
+imap_body(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
Warning: imap_body(): UID does not exist in %s on line %d
bool(false)
diff --git a/ext/imap/tests/imap_close_variation4.phpt b/ext/imap/tests/imap_close_variation4.phpt
index 56e3722e9e..b57f607f88 100644
--- a/ext/imap/tests/imap_close_variation4.phpt
+++ b/ext/imap/tests/imap_close_variation4.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_close() function : usage variations - different ints as $options arg
+Test imap_close() function : usage variations - different ints as $flags arg
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers as $options arg to imap_close() to test which are
+ * Pass different integers as $flags arg to imap_close() to test which are
* recognised as CL_EXPUNGE option
*/
@@ -76,10 +76,10 @@ bool(true)
CL_EXPUNGE was set
-- Iteration 3 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
-- Iteration 4 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
-- Iteration 5 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
diff --git a/ext/imap/tests/imap_fetch_overview_variation3.phpt b/ext/imap/tests/imap_fetch_overview_variation3.phpt
index 68d8d20ce4..f416887388 100644
--- a/ext/imap/tests/imap_fetch_overview_variation3.phpt
+++ b/ext/imap/tests/imap_fetch_overview_variation3.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test passing a range of values into the $options argument to imap_fetch_overview():
+ * Test passing a range of values into the $flags argument to imap_fetch_overview():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -21,7 +21,7 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
$msg_no = 1;
$msg_uid = imap_uid($stream_id, $msg_no);
-$options = array ('1',
+$flags = array ('1',
true,
1.000000000000001,
0.00001e5,
@@ -29,7 +29,7 @@ $options = array ('1',
);
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\nTesting with option value:";
var_dump($option);
try {
@@ -65,4 +65,4 @@ Testing with option value:float(1)
imap_fetch_overview() returns an object
Testing with option value:int(245)
-imap_fetch_overview(): Argument #3 ($options) must be FT_UID or 0
+imap_fetch_overview(): Argument #3 ($flags) must be FT_UID or 0
diff --git a/ext/imap/tests/imap_fetchbody_variation4.phpt b/ext/imap/tests/imap_fetchbody_variation4.phpt
index 510e78fd31..df5d895670 100644
--- a/ext/imap/tests/imap_fetchbody_variation4.phpt
+++ b/ext/imap/tests/imap_fetchbody_variation4.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test if FT_UID is set by passing the following as $options argument to imap_fetchbody():
+ * Test if FT_UID is set by passing the following as $flags argument to imap_fetchbody():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -22,14 +22,14 @@ $msg_uid = imap_uid($stream_id, $msg_no);
$section = 1;
//Note: the first four values are valid as they will all be cast to 1L.
-$options = array ('1', true,
+$flags = array ('1', true,
1.000000000000001, 0.00001e5,
PHP_INT_MAX, -PHP_INT_MAX);
-// iterate over each element of $options array to test whether FT_UID is set
+// iterate over each element of $flags array to test whether FT_UID is set
$iterator = 1;
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\n-- Iteration $iterator --\n";
try {
@@ -67,7 +67,7 @@ FT_UID valid
FT_UID valid
-- Iteration 5 --
-imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
-- Iteration 6 --
-imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
diff --git a/ext/imap/tests/imap_fetchbody_variation6.phpt b/ext/imap/tests/imap_fetchbody_variation6.phpt
index a99f7950eb..8b3d73540a 100644
--- a/ext/imap/tests/imap_fetchbody_variation6.phpt
+++ b/ext/imap/tests/imap_fetchbody_variation6.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_fetchbody() function : usage variations - $msg_no arg
+Test imap_fetchbody() function : usage variations - $message_num arg
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers, strings, msg sequences and msg UIDs as $msg_no argument
+ * Pass different integers, strings, msg sequences and msg UIDs as $message_num argument
* to test behaviour of imap_fetchbody()
*/
@@ -21,10 +21,10 @@ $section = 1;
$sequences = [0, /* out of range */ 4, 1];
-foreach($sequences as $msg_no) {
- echo "\n-- \$msg_no is $msg_no --\n";
+foreach($sequences as $message_num) {
+ echo "\n-- \$message_num is $message_num --\n";
try {
- var_dump(imap_fetchbody($stream_id, $msg_no, $section));
+ var_dump(imap_fetchbody($stream_id, $message_num, $section));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
@@ -39,14 +39,14 @@ require_once(__DIR__.'/clean.inc');
Create a temporary mailbox and add 3 msgs
.. mailbox '{%s}%s' created
--- $msg_no is 0 --
-imap_fetchbody(): Argument #2 ($msg_no) must be greater than 0
+-- $message_num is 0 --
+imap_fetchbody(): Argument #2 ($message_num) must be greater than 0
--- $msg_no is 4 --
+-- $message_num is 4 --
Warning: imap_fetchbody(): Bad message number in %s on line %d
bool(false)
--- $msg_no is 1 --
+-- $message_num is 1 --
string(%s) "1: this is a test message, please ignore
%A"
diff --git a/ext/imap/tests/imap_fetchheader_variation3.phpt b/ext/imap/tests/imap_fetchheader_variation3.phpt
index 9391393782..a457db0491 100644
--- a/ext/imap/tests/imap_fetchheader_variation3.phpt
+++ b/ext/imap/tests/imap_fetchheader_variation3.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test if FT_UID is set by passing the following as $options argument to imap_fetchheader():
+ * Test if FT_UID is set by passing the following as $flags argument to imap_fetchheader():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -21,14 +21,14 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
$msg_no = 1;
$msg_uid = imap_uid($stream_id, $msg_no);
-$options = array ('1', true,
+$flags = array ('1', true,
1.000000000000001, 0.00001e5,
PHP_INT_MAX, -PHP_INT_MAX);
-// iterate over each element of $options array to test whether FT_UID is set
+// iterate over each element of $flags array to test whether FT_UID is set
$iterator = 1;
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\n-- Iteration $iterator --\n";
try {
if (is_string(imap_fetchheader($stream_id, $msg_uid, $option))) {
@@ -64,7 +64,7 @@ FT_UID valid
FT_UID valid
-- Iteration 5 --
-imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
+imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
-- Iteration 6 --
-imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
+imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
diff --git a/ext/imap/tests/imap_fetchheader_variation5.phpt b/ext/imap/tests/imap_fetchheader_variation5.phpt
index e6e641632f..cb00986a06 100644
--- a/ext/imap/tests/imap_fetchheader_variation5.phpt
+++ b/ext/imap/tests/imap_fetchheader_variation5.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_fetchheader() function : usage variations - $msg_no argument
+Test imap_fetchheader() function : usage variations - $message_num argument
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers and strings as $msg_no argument
+ * Pass different integers and strings as $message_num argument
* to test behaviour of imap_fetchheader()
*/
@@ -19,10 +19,10 @@ $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp ma
$sequences = [0, /* out of range */ 4, 1];
-foreach($sequences as $msg_no) {
- echo "\n-- \$msg_no is $msg_no --\n";
+foreach($sequences as $message_num) {
+ echo "\n-- \$message_num is $message_num --\n";
try {
- var_dump(imap_fetchheader($stream_id, $msg_no));
+ var_dump(imap_fetchheader($stream_id, $message_num));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
@@ -40,15 +40,15 @@ require_once(__DIR__.'/clean.inc');
Create a temporary mailbox and add 3 msgs
.. mailbox '{%s}%s' created
--- $msg_no is 0 --
-imap_fetchheader(): Argument #2 ($msg_no) must be greater than 0
+-- $message_num is 0 --
+imap_fetchheader(): Argument #2 ($message_num) must be greater than 0
--- $msg_no is 4 --
+-- $message_num is 4 --
Warning: imap_fetchheader(): Bad message number in %s on line %d
bool(false)
--- $msg_no is 1 --
+-- $message_num is 1 --
string(%d) "From: foo@anywhere.com
Subject: Test msg 1
To: %s
diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt
index 11c1f7efb2..24cd2307dd 100644
--- a/ext/imap/tests/imap_fetchstructure_basic.phpt
+++ b/ext/imap/tests/imap_fetchstructure_basic.phpt
@@ -43,7 +43,7 @@ require_once('clean.inc');
--EXPECTF--
Create a temporary mailbox and add 1 msgs
.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
-imap_fetchstructure(): Argument #2 ($msg_no) must be greater than 0
+imap_fetchstructure(): Argument #2 ($message_num) must be greater than 0
bool(true)
bool(true)
bool(true)
diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt
index fe59a6a25e..be1063fadc 100644
--- a/ext/imap/tests/imap_open_error.phpt
+++ b/ext/imap/tests/imap_open_error.phpt
@@ -33,7 +33,7 @@ try {
Checking with incorrect parameters
Warning: imap_open(): Couldn't open stream in %s on line %d
-imap_open(): Argument #4 ($options) must be a bitmask of the OP_* constants, and CL_EXPUNGE
-imap_open(): Argument #5 ($n_retries) must be greater than or equal to 0
+imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE
+imap_open(): Argument #5 ($retries) must be greater than or equal to 0
Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0