Skip to content

Commit 172bdd5

Browse files
committed
Adapt tests
1 parent 973ede4 commit 172bdd5

26 files changed

+69
-69
lines changed

ext/dba/tests/dba013.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc');
2424
--EXPECTF--
2525
database handler: %s
2626

27-
Fatal error: Uncaught Error: Key does not have exactly two elements: (key, name) in %sdba013.php:6
27+
Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d
2828
Stack trace:
2929
#0 %sdba013.php(6): dba_insert(Array, '%s', Resource id #%d)
3030
#1 {main}

ext/dba/tests/dba014.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc');
2424
--EXPECTF--
2525
database handler: %s
2626

27-
Fatal error: Uncaught Error: Key does not have exactly two elements: (key, name) in %sdba014.php:6
27+
Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d
2828
Stack trace:
2929
#0 %sdba014.php(6): dba_insert(Array, '%s', Resource id #%d)
3030
#1 {main}

ext/hash/tests/reuse.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ catch (\Error $e) {
1313
}
1414

1515
--EXPECT--
16-
hash_update(): supplied resource is not a valid Hash Context resource
16+
hash_update(): Argument #1 ($context) must be a valid Hash Context resource

ext/mbstring/tests/mb_decode_numericentity.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ aŒbœcŠdše€fg
4242
&#100000000000
4343
&#000000000000
4444
föo
45-
count($convmap) must be a multiple of 4
45+
mb_decode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements

ext/mbstring/tests/mb_encode_numericentity.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ try {
3131
ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦
3232
aŒbœcŠdše€fg
3333
föo
34-
count($convmap) must be a multiple of 4
34+
mb_encode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements

ext/standard/tests/array/array_chunk2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var_dump(array_chunk($input_array, 10));
2424
var_dump(array_chunk($input_array, 10, true));
2525
?>
2626
--EXPECT--
27-
Size parameter expected to be greater than 0
28-
Size parameter expected to be greater than 0
27+
array_chunk(): Argument #2 ($size) must be greater than 0
28+
array_chunk(): Argument #2 ($size) must be greater than 0
2929
array(5) {
3030
[0]=>
3131
array(1) {

ext/standard/tests/array/array_chunk_variation5.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ foreach ($sizes as $size){
4949
*** Testing array_chunk() : usage variations ***
5050

5151
-- Testing array_chunk() when size = -1 --
52-
Size parameter expected to be greater than 0
53-
Size parameter expected to be greater than 0
54-
Size parameter expected to be greater than 0
52+
array_chunk(): Argument #2 ($size) must be greater than 0
53+
array_chunk(): Argument #2 ($size) must be greater than 0
54+
array_chunk(): Argument #2 ($size) must be greater than 0
5555

5656
-- Testing array_chunk() when size = 4 --
5757
array(1) {
@@ -89,9 +89,9 @@ array(1) {
8989
}
9090

9191
-- Testing array_chunk() when size = 0 --
92-
Size parameter expected to be greater than 0
93-
Size parameter expected to be greater than 0
94-
Size parameter expected to be greater than 0
92+
array_chunk(): Argument #2 ($size) must be greater than 0
93+
array_chunk(): Argument #2 ($size) must be greater than 0
94+
array_chunk(): Argument #2 ($size) must be greater than 0
9595

9696
-- Testing array_chunk() when size = 1.5 --
9797
array(3) {

ext/standard/tests/array/array_combine_error2.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ array(0) {
4747
}
4848

4949
-- Testing array_combine() function with empty array for $keys argument --
50-
Both parameters should have an equal number of elements
50+
array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements
5151
-- Testing array_combine() function with empty array for $values argument --
52-
Both parameters should have an equal number of elements
52+
array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements
5353
-- Testing array_combine() function by passing array with unequal number of elements --
54-
Both parameters should have an equal number of elements
54+
array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements

ext/standard/tests/array/array_fill_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ try {
2424
?>
2525
--EXPECT--
2626
*** Testing array_fill() : error conditions ***
27-
Number of elements can't be negative
27+
array_fill(): Argument #2 ($num) must be greater than or equal to 0

ext/standard/tests/array/array_pad.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ array(4) {
8484
[3]=>
8585
float(2)
8686
}
87-
You may only pad up to 1048576 elements at a time
87+
array_pad(): Argument #2 ($pad_size) must be less than 1048576

ext/standard/tests/array/array_rand.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ var_dump(array_rand(array(1,2,3), 2));
3838

3939
?>
4040
--EXPECTF--
41-
Array is empty
42-
Array is empty
43-
Second argument has to be between 1 and the number of elements in the array
44-
Second argument has to be between 1 and the number of elements in the array
45-
Second argument has to be between 1 and the number of elements in the array
41+
array_rand(): Argument #1 ($arg) cannot be empty
42+
array_rand(): Argument #1 ($arg) cannot be empty
43+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
44+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
45+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
4646
array(3) {
4747
[0]=>
4848
int(%d)

ext/standard/tests/array/array_rand_variation5.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ int(%d)
7070
int(%d)
7171

7272
-- With num_req = 0 --
73-
Second argument has to be between 1 and the number of elements in the array
73+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
7474

7575
-- With num_req = -1 --
76-
Second argument has to be between 1 and the number of elements in the array
76+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
7777

7878
-- With num_req = -2 --
79-
Second argument has to be between 1 and the number of elements in the array
79+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)
8080

8181
-- With num_req more than number of members in 'input' array --
82-
Second argument has to be between 1 and the number of elements in the array
82+
array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg)

ext/standard/tests/array/extract_error_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ try {
1111
}
1212
?>
1313
--EXPECT--
14-
Prefix is not a valid identifier
14+
extract(): Argument #3 ($prefix) must be a valid identifier

ext/standard/tests/array/range_errors.phpt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,33 @@ foreach( $step_arr as $step ) {
8787
*** Testing error conditions ***
8888

8989
-- Testing ( (low < high) && (step = 0) ) --
90-
Step exceeds the specified range
91-
Step exceeds the specified range
90+
range(): Argument #3 ($step) must not exceed the specified range
91+
range(): Argument #3 ($step) must not exceed the specified range
9292

9393

9494
-- Testing ( (low > high) && (step = 0) ) --
95-
Step exceeds the specified range
96-
Step exceeds the specified range
95+
range(): Argument #3 ($step) must not exceed the specified range
96+
range(): Argument #3 ($step) must not exceed the specified range
9797

9898

9999
-- Testing ( (low < high) && (high-low < step) ) --
100-
Step exceeds the specified range
100+
range(): Argument #3 ($step) must not exceed the specified range
101101

102102

103103
-- Testing ( (low > high) && (low-high < step) ) --
104-
Step exceeds the specified range
104+
range(): Argument #3 ($step) must not exceed the specified range
105105

106106
-- Testing other conditions --
107-
Step exceeds the specified range
107+
range(): Argument #3 ($step) must not exceed the specified range
108108
range(): Argument #3 ($step) must be of type int|float, string given
109-
Step exceeds the specified range
109+
range(): Argument #3 ($step) must not exceed the specified range
110110

111111
Notice: A non well formed numeric value encountered in %s on line %d
112-
Step exceeds the specified range
112+
range(): Argument #3 ($step) must not exceed the specified range
113113

114114
-- Testing Invalid steps --
115115
range(): Argument #3 ($step) must be of type int|float, string given
116-
Step exceeds the specified range
117-
Step exceeds the specified range
116+
range(): Argument #3 ($step) must not exceed the specified range
117+
range(): Argument #3 ($step) must not exceed the specified range
118118
range(): Argument #3 ($step) must be of type int|float, string given
119119
range(): Argument #3 ($step) must be of type int|float, string given

ext/standard/tests/dir/readdir_variation7.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ try {
2525
--EXPECTF--
2626
*** Testing readdir() : usage variations ***
2727
resource(%d) of type (stream)
28-
%d is not a valid Directory resource
28+
readdir(): Argument #1 ($dir_handle) must be a valid Directory resource

ext/standard/tests/file/flock.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ int(0)
6060
bool(true)
6161
int(0)
6262
bool(true)
63-
Illegal operation argument
63+
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN

ext/standard/tests/file/flock_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ unlink($file);
5757
--EXPECT--
5858
*** Testing error conditions ***
5959
--- Iteration 0 ---
60-
Illegal operation argument
60+
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
6161
--- Iteration 1 ---
62-
Illegal operation argument
62+
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
6363
--- Iteration 2 ---
64-
Illegal operation argument
64+
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
6565
--- Iteration 3 ---
66-
Illegal operation argument
66+
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
6767
--- Iteration 4 ---
6868
flock(): Argument #2 ($operation) must be of type int, array given
6969
--- Iteration 5 ---

ext/standard/tests/general_functions/bug46587.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ echo "Done.\n";
1414
?>
1515
--EXPECTF--
1616
int(%d)
17-
max (3) is smaller than min (8)
17+
mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min)
1818
Done.

ext/standard/tests/general_functions/proc_open_array.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ proc_close($proc);
6868
?>
6969
--EXPECT--
7070
Empty command array:
71-
Command array must have at least one element
71+
proc_open(): Argument #1 ($cmd) must have at least one element
7272

7373
Nul byte in program name:
7474
Command array element 1 contains a null byte

ext/standard/tests/general_functions/proc_open_pipes3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ echo "END\n";
3232
?>
3333
--EXPECTF--
3434
Warning: proc_open(): pi is not a valid descriptor spec/mode in %s on line %d
35-
Descriptor item must be either an array or a File-Handle
35+
proc_open(): Argument #2 ($descriptorspec) must only contain arrays and File-Handles
3636
array(4) {
3737
[3]=>
3838
resource(%d) of type (Unknown)

ext/standard/tests/general_functions/register_tick_function_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ try {
1111
}
1212
?>
1313
--EXPECT--
14-
Invalid tick callback 'a' passed
14+
register_tick_function(): Argument #1 ($function) must be a valid tick callback

ext/standard/tests/math/base_convert_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ try {
3434
?>
3535
--EXPECT--
3636
*** Testing base_convert() : error conditions ***
37-
Invalid `from base' (1)
38-
Invalid `to base' (37)
37+
base_convert(): Argument #2 ($frombase) must be between 2 and 36 (inclusive)
38+
base_convert(): Argument #3 ($tobase) must be between 2 and 36 (inclusive)
3939
Object of class classA could not be converted to string

ext/standard/tests/strings/explode.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ array (
6060
4 => 'd',
6161
)
6262
d6bee42a771449205344c0938ad4f035
63-
Empty delimiter
64-
Empty delimiter
65-
Empty delimiter
63+
explode(): Argument #1 ($separator) cannot be empty
64+
explode(): Argument #1 ($separator) cannot be empty
65+
explode(): Argument #1 ($separator) cannot be empty
6666
array(1) {
6767
[0]=>
6868
string(0) ""
@@ -77,7 +77,7 @@ array(1) {
7777
[0]=>
7878
string(0) ""
7979
}
80-
Empty delimiter
80+
explode(): Argument #1 ($separator) cannot be empty
8181
array(1) {
8282
[0]=>
8383
string(3) "acb"

ext/standard/tests/strings/explode1.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ var_dump( explode("b", $obj) );
9898
--EXPECT--
9999
*** Testing explode() for basic operations ***
100100
-- Iteration 1 --
101-
Empty delimiter
102-
Empty delimiter
103-
Empty delimiter
104-
Empty delimiter
101+
explode(): Argument #1 ($separator) cannot be empty
102+
explode(): Argument #1 ($separator) cannot be empty
103+
explode(): Argument #1 ($separator) cannot be empty
104+
explode(): Argument #1 ($separator) cannot be empty
105105
-- Iteration 2 --
106-
Empty delimiter
107-
Empty delimiter
108-
Empty delimiter
109-
Empty delimiter
106+
explode(): Argument #1 ($separator) cannot be empty
107+
explode(): Argument #1 ($separator) cannot be empty
108+
explode(): Argument #1 ($separator) cannot be empty
109+
explode(): Argument #1 ($separator) cannot be empty
110110
-- Iteration 3 --
111111
array(1) {
112112
[0]=>
@@ -208,10 +208,10 @@ array(2) {
208208
string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND"
209209
}
210210
-- Iteration 7 --
211-
Empty delimiter
212-
Empty delimiter
213-
Empty delimiter
214-
Empty delimiter
211+
explode(): Argument #1 ($separator) cannot be empty
212+
explode(): Argument #1 ($separator) cannot be empty
213+
explode(): Argument #1 ($separator) cannot be empty
214+
explode(): Argument #1 ($separator) cannot be empty
215215
-- Iteration 8 --
216216
array(2) {
217217
[0]=>

ext/standard/tests/strings/wordwrap.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ try {
4040
}
4141
--EXPECT--
4242
OK
43-
Break string cannot be empty
43+
wordwrap(): Argument #3 ($break) cannot be empty

ext/standard/tests/strings/wordwrap_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var_dump( wordwrap($str, $width, $break, $cut) );
5252
-- width = 0 & cut = false --
5353
string(39) "testing<br />\nwordwrap<br />\nfunction"
5454
-- width = 0 & cut = true --
55-
Can't force cut when width is zero
55+
wordwrap(): Argument #4 ($cut) cannot be true when argument #2 ($width) is 0
5656
-- width = -10 & cut = false --
5757
string(39) "testing<br />\nwordwrap<br />\nfunction"
5858
-- width = -10 & cut = true --

0 commit comments

Comments
 (0)