Skip to content

Commit b0c1b78

Browse files
committed
Test fixes
1 parent eed9d8a commit b0c1b78

9 files changed

+44
-44
lines changed

ext/imap/tests/imap_body.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ imap_close($stream_id);
3232

3333
?>
3434
--EXPECTF--
35-
imap_body(): Argument #2 ($msg_no) must be greater than 0
36-
imap_body(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
35+
imap_body(): Argument #2 ($message_num) must be greater than 0
36+
imap_body(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
3737

3838
Warning: imap_body(): UID does not exist in %s on line %d
3939
bool(false)

ext/imap/tests/imap_close_variation4.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
--TEST--
2-
Test imap_close() function : usage variations - different ints as $options arg
2+
Test imap_close() function : usage variations - different ints as $flags arg
33
--SKIPIF--
44
<?php
55
require_once(__DIR__.'/skipif.inc');
66
?>
77
--FILE--
88
<?php
99
/*
10-
* Pass different integers as $options arg to imap_close() to test which are
10+
* Pass different integers as $flags arg to imap_close() to test which are
1111
* recognised as CL_EXPUNGE option
1212
*/
1313

@@ -76,10 +76,10 @@ bool(true)
7676
CL_EXPUNGE was set
7777

7878
-- Iteration 3 --
79-
imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
79+
imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
8080

8181
-- Iteration 4 --
82-
imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
82+
imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
8383

8484
-- Iteration 5 --
85-
imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
85+
imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0

ext/imap/tests/imap_fetch_overview_variation3.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
77
--FILE--
88
<?php
99
/*
10-
* Test passing a range of values into the $options argument to imap_fetch_overview():
10+
* Test passing a range of values into the $flags argument to imap_fetch_overview():
1111
* 1. values that equate to 1
1212
* 2. Minimum and maximum PHP values
1313
*/
@@ -21,15 +21,15 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
2121
$msg_no = 1;
2222
$msg_uid = imap_uid($stream_id, $msg_no);
2323

24-
$options = array ('1',
24+
$flags = array ('1',
2525
true,
2626
1.000000000000001,
2727
0.00001e5,
2828
245
2929
);
3030

3131
imap_check($stream_id);
32-
foreach($options as $option) {
32+
foreach($flags as $option) {
3333
echo "\nTesting with option value:";
3434
var_dump($option);
3535
try {
@@ -65,4 +65,4 @@ Testing with option value:float(1)
6565
imap_fetch_overview() returns an object
6666

6767
Testing with option value:int(245)
68-
imap_fetch_overview(): Argument #3 ($options) must be FT_UID or 0
68+
imap_fetch_overview(): Argument #3 ($flags) must be FT_UID or 0

ext/imap/tests/imap_fetchbody_variation4.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
77
--FILE--
88
<?php
99
/*
10-
* Test if FT_UID is set by passing the following as $options argument to imap_fetchbody():
10+
* Test if FT_UID is set by passing the following as $flags argument to imap_fetchbody():
1111
* 1. values that equate to 1
1212
* 2. Minimum and maximum PHP values
1313
*/
@@ -22,14 +22,14 @@ $msg_uid = imap_uid($stream_id, $msg_no);
2222
$section = 1;
2323

2424
//Note: the first four values are valid as they will all be cast to 1L.
25-
$options = array ('1', true,
25+
$flags = array ('1', true,
2626
1.000000000000001, 0.00001e5,
2727
PHP_INT_MAX, -PHP_INT_MAX);
2828

29-
// iterate over each element of $options array to test whether FT_UID is set
29+
// iterate over each element of $flags array to test whether FT_UID is set
3030
$iterator = 1;
3131
imap_check($stream_id);
32-
foreach($options as $option) {
32+
foreach($flags as $option) {
3333
echo "\n-- Iteration $iterator --\n";
3434

3535
try {
@@ -67,7 +67,7 @@ FT_UID valid
6767
FT_UID valid
6868

6969
-- Iteration 5 --
70-
imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
70+
imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
7171

7272
-- Iteration 6 --
73-
imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
73+
imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL

ext/imap/tests/imap_fetchbody_variation6.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
--TEST--
2-
Test imap_fetchbody() function : usage variations - $msg_no arg
2+
Test imap_fetchbody() function : usage variations - $message_num arg
33
--SKIPIF--
44
<?php
55
require_once(__DIR__.'/skipif.inc');
66
?>
77
--FILE--
88
<?php
99
/*
10-
* Pass different integers, strings, msg sequences and msg UIDs as $msg_no argument
10+
* Pass different integers, strings, msg sequences and msg UIDs as $message_num argument
1111
* to test behaviour of imap_fetchbody()
1212
*/
1313

@@ -21,10 +21,10 @@ $section = 1;
2121

2222
$sequences = [0, /* out of range */ 4, 1];
2323

24-
foreach($sequences as $msg_no) {
25-
echo "\n-- \$msg_no is $msg_no --\n";
24+
foreach($sequences as $message_num) {
25+
echo "\n-- \$message_num is $message_num --\n";
2626
try {
27-
var_dump(imap_fetchbody($stream_id, $msg_no, $section));
27+
var_dump(imap_fetchbody($stream_id, $message_num, $section));
2828
} catch (\ValueError $e) {
2929
echo $e->getMessage() . \PHP_EOL;
3030
}
@@ -39,14 +39,14 @@ require_once(__DIR__.'/clean.inc');
3939
Create a temporary mailbox and add 3 msgs
4040
.. mailbox '{%s}%s' created
4141

42-
-- $msg_no is 0 --
43-
imap_fetchbody(): Argument #2 ($msg_no) must be greater than 0
42+
-- $message_num is 0 --
43+
imap_fetchbody(): Argument #2 ($message_num) must be greater than 0
4444

45-
-- $msg_no is 4 --
45+
-- $message_num is 4 --
4646

4747
Warning: imap_fetchbody(): Bad message number in %s on line %d
4848
bool(false)
4949

50-
-- $msg_no is 1 --
50+
-- $message_num is 1 --
5151
string(%s) "1: this is a test message, please ignore
5252
%A"

ext/imap/tests/imap_fetchheader_variation3.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
77
--FILE--
88
<?php
99
/*
10-
* Test if FT_UID is set by passing the following as $options argument to imap_fetchheader():
10+
* Test if FT_UID is set by passing the following as $flags argument to imap_fetchheader():
1111
* 1. values that equate to 1
1212
* 2. Minimum and maximum PHP values
1313
*/
@@ -21,14 +21,14 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
2121
$msg_no = 1;
2222
$msg_uid = imap_uid($stream_id, $msg_no);
2323

24-
$options = array ('1', true,
24+
$flags = array ('1', true,
2525
1.000000000000001, 0.00001e5,
2626
PHP_INT_MAX, -PHP_INT_MAX);
2727

28-
// iterate over each element of $options array to test whether FT_UID is set
28+
// iterate over each element of $flags array to test whether FT_UID is set
2929
$iterator = 1;
3030
imap_check($stream_id);
31-
foreach($options as $option) {
31+
foreach($flags as $option) {
3232
echo "\n-- Iteration $iterator --\n";
3333
try {
3434
if (is_string(imap_fetchheader($stream_id, $msg_uid, $option))) {
@@ -64,7 +64,7 @@ FT_UID valid
6464
FT_UID valid
6565

6666
-- Iteration 5 --
67-
imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
67+
imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
6868

6969
-- Iteration 6 --
70-
imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
70+
imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL

ext/imap/tests/imap_fetchheader_variation5.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
--TEST--
2-
Test imap_fetchheader() function : usage variations - $msg_no argument
2+
Test imap_fetchheader() function : usage variations - $message_num argument
33
--SKIPIF--
44
<?php
55
require_once(__DIR__.'/skipif.inc');
66
?>
77
--FILE--
88
<?php
99
/*
10-
* Pass different integers and strings as $msg_no argument
10+
* Pass different integers and strings as $message_num argument
1111
* to test behaviour of imap_fetchheader()
1212
*/
1313

@@ -19,10 +19,10 @@ $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp ma
1919

2020
$sequences = [0, /* out of range */ 4, 1];
2121

22-
foreach($sequences as $msg_no) {
23-
echo "\n-- \$msg_no is $msg_no --\n";
22+
foreach($sequences as $message_num) {
23+
echo "\n-- \$message_num is $message_num --\n";
2424
try {
25-
var_dump(imap_fetchheader($stream_id, $msg_no));
25+
var_dump(imap_fetchheader($stream_id, $message_num));
2626
} catch (\ValueError $e) {
2727
echo $e->getMessage() . \PHP_EOL;
2828
}
@@ -40,15 +40,15 @@ require_once(__DIR__.'/clean.inc');
4040
Create a temporary mailbox and add 3 msgs
4141
.. mailbox '{%s}%s' created
4242

43-
-- $msg_no is 0 --
44-
imap_fetchheader(): Argument #2 ($msg_no) must be greater than 0
43+
-- $message_num is 0 --
44+
imap_fetchheader(): Argument #2 ($message_num) must be greater than 0
4545

46-
-- $msg_no is 4 --
46+
-- $message_num is 4 --
4747

4848
Warning: imap_fetchheader(): Bad message number in %s on line %d
4949
bool(false)
5050

51-
-- $msg_no is 1 --
51+
-- $message_num is 1 --
5252
string(%d) "From: foo@anywhere.com
5353
Subject: Test msg 1
5454
To: %s

ext/imap/tests/imap_fetchstructure_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ require_once('clean.inc');
4343
--EXPECTF--
4444
Create a temporary mailbox and add 1 msgs
4545
.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
46-
imap_fetchstructure(): Argument #2 ($msg_no) must be greater than 0
46+
imap_fetchstructure(): Argument #2 ($message_num) must be greater than 0
4747
bool(true)
4848
bool(true)
4949
bool(true)

ext/imap/tests/imap_open_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ try {
3333
Checking with incorrect parameters
3434

3535
Warning: imap_open(): Couldn't open stream in %s on line %d
36-
imap_open(): Argument #4 ($options) must be a bitmask of the OP_* constants, and CL_EXPUNGE
37-
imap_open(): Argument #5 ($n_retries) must be greater than or equal to 0
36+
imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE
37+
imap_open(): Argument #5 ($retries) must be greater than or equal to 0
3838

3939
Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0

0 commit comments

Comments
 (0)