Skip to content

Commit dd4e487

Browse files
committed
Update tests after error message change (WIP)
1 parent b1b510e commit dd4e487

28 files changed

+67
-27
lines changed

Zend/tests/null_to_non_nullable_special_func.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ var_dump(strlen($null));
88

99
?>
1010
--EXPECTF--
11-
Deprecated: strlen(): Passing null to parameter of type string is deprecated in %s on line %d
11+
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
1212
int(0)

ext/date/tests/bug54283.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ try {
1111

1212
?>
1313
--EXPECTF--
14-
Deprecated: DatePeriod::__construct(): Passing null to parameter of type string is deprecated in %s on line %d
14+
Deprecated: DatePeriod::__construct(): Passing null to parameter #1 ($start) of type string is deprecated in %s on line %d
1515
string(51) "DatePeriod::__construct(): Unknown or bad format ()"

ext/date/tests/date_interval_create_from_date_string_nullparam.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $i = date_interval_create_from_date_string(null);
88
var_dump($i);
99
?>
1010
--EXPECTF--
11-
Deprecated: date_interval_create_from_date_string(): Passing null to parameter of type string is deprecated in %s on line %d
11+
Deprecated: date_interval_create_from_date_string(): Passing null to parameter #1 ($datetime) of type string is deprecated in %s on line %d
1212

1313
Warning: date_interval_create_from_date_string(): Unknown or bad format () at position 0 ( ): Empty string in %sdate_interval_create_from_date_string_nullparam.php on line 2
1414
bool(false)

ext/date/tests/date_timestamp_set_nullparam2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $dtms021 = date_create();
1414
var_dump(date_timestamp_set($dtms021, null));
1515
?>
1616
--EXPECTF--
17-
Deprecated: date_timestamp_set(): Passing null to parameter of type int is deprecated in %s on line %d
17+
Deprecated: date_timestamp_set(): Passing null to parameter #2 ($timestamp) of type int is deprecated in %s on line %d
1818
object(DateTime)#1 (3) {
1919
["date"]=>
2020
string(26) "1970-01-01 00:00:00.000000"

ext/reflection/tests/ReflectionClass_constructor_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ try {
4848
--EXPECTF--
4949
ReflectionClass::__construct() expects exactly 1 argument, 0 given
5050

51-
Deprecated: ReflectionClass::__construct(): Passing null to parameter of type string is deprecated in %s on line %d
51+
Deprecated: ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in %s on line %d
5252
Class "" does not exist
5353
Class "1" does not exist
5454
Class "1" does not exist

ext/reflection/tests/ReflectionClass_getMethod_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Check invalid params:
5959
ReflectionClass::getMethod() expects exactly 1 argument, 0 given
6060
ReflectionClass::getMethod() expects exactly 1 argument, 2 given
6161

62-
Deprecated: ReflectionClass::getMethod(): Passing null to parameter of type string is deprecated in %s on line %d
62+
Deprecated: ReflectionClass::getMethod(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
6363
Method C::() does not exist
6464
Method C::1() does not exist
6565
Method C::1.5() does not exist

ext/reflection/tests/ReflectionClass_getProperty_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Check invalid params:
5757
ReflectionClass::getProperty() expects exactly 1 argument, 0 given
5858
ReflectionClass::getProperty() expects exactly 1 argument, 2 given
5959

60-
Deprecated: ReflectionClass::getProperty(): Passing null to parameter of type string is deprecated in %s on line %d
60+
Deprecated: ReflectionClass::getProperty(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
6161
Property C::$ does not exist
6262
Property C::$1 does not exist
6363
Property C::$1.5 does not exist

ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ try {
4242
ReflectionClass::getStaticPropertyValue() expects at most 2 arguments, 3 given
4343
ReflectionClass::getStaticPropertyValue() expects at least 1 argument, 0 given
4444

45-
Deprecated: ReflectionClass::getStaticPropertyValue(): Passing null to parameter of type string is deprecated in %s on line %d
45+
Deprecated: ReflectionClass::getStaticPropertyValue(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
4646
Property C::$ does not exist
4747
string(3) "def"
4848
ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given

ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Test bad arguments:
147147
ReflectionClass::implementsInterface() expects exactly 1 argument, 0 given
148148
ReflectionClass::implementsInterface() expects exactly 1 argument, 2 given
149149

150-
Deprecated: ReflectionClass::implementsInterface(): Passing null to parameter of type string is deprecated in %s on line %d
150+
Deprecated: ReflectionClass::implementsInterface(): Passing null to parameter #1 ($interface) of type ReflectionClass|string is deprecated in %s on line %d
151151
Interface "" does not exist
152152
Interface "ThisClassDoesNotExist" does not exist
153153
Interface "2" does not exist

ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Test bad arguments:
4040
ReflectionClass::isSubclassOf() expects exactly 1 argument, 0 given
4141
ReflectionClass::isSubclassOf() expects exactly 1 argument, 2 given
4242

43-
Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter of type string is deprecated in %s on line %d
43+
Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter #1 ($class) of type ReflectionClass|string is deprecated in %s on line %d
4444
Class "" does not exist
4545
Class "ThisClassDoesNotExist" does not exist
4646
Class "2" does not exist

ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 3 given
4848
ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 0 given
4949
ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 1 given
5050

51-
Deprecated: ReflectionClass::setStaticPropertyValue(): Passing null to parameter of type string is deprecated in %s on line %d
51+
Deprecated: ReflectionClass::setStaticPropertyValue(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
5252
Class C does not have a property named
5353
Class C does not have a property named 1.5
5454
ReflectionClass::setStaticPropertyValue(): Argument #1 ($name) must be of type string, array given

ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Test bad arguments:
4040
ReflectionClass::isSubclassOf() expects exactly 1 argument, 0 given
4141
ReflectionClass::isSubclassOf() expects exactly 1 argument, 2 given
4242

43-
Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter of type string is deprecated in %s on line %d
43+
Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter #1 ($class) of type ReflectionClass|string is deprecated in %s on line %d
4444
Class "" does not exist
4545
Class "ThisClassDoesNotExist" does not exist
4646
Class "2" does not exist

ext/standard/tests/array/range_errors.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ foreach( $step_arr as $step ) {
9191
}
9292
}
9393
?>
94-
--EXPECT--
94+
--EXPECTF--
9595
*** Testing error conditions ***
9696

9797
-- Testing ( (low < high) && (step = 0) ) --
@@ -126,6 +126,8 @@ range(): Argument #3 ($step) must not exceed the specified range
126126

127127
-- Testing Invalid steps --
128128
range(): Argument #3 ($step) must be of type int|float, string given
129+
130+
Deprecated: range(): Passing null to parameter #3 ($step) of type int|float is deprecated in %s on line %d
129131
range(): Argument #3 ($step) must not exceed the specified range
130132
range(): Argument #3 ($step) must not exceed the specified range
131133
range(): Argument #3 ($step) must be of type int|float, string given

ext/standard/tests/math/abs_basic.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ for ($i = 0; $i < count($values); $i++) {
2626
var_dump($res);
2727
}
2828
?>
29-
--EXPECT--
29+
--EXPECTF--
3030
*** Testing abs() : basic functionality ***
3131
int(23)
3232
int(23)
@@ -39,6 +39,8 @@ int(23)
3939
float(23.45)
4040
float(23.45)
4141
float(23.45)
42+
43+
Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
4244
int(0)
4345
int(1)
4446
int(0)

ext/standard/tests/math/abs_variation.phpt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,17 @@ foreach($inputs as $input) {
7878

7979
fclose($fp);
8080
?>
81-
--EXPECT--
81+
--EXPECTF--
8282
*** Testing abs() : usage variations ***
8383

8484
-- Iteration 1 --
85+
86+
Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
8587
int(0)
8688

8789
-- Iteration 2 --
90+
91+
Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
8892
int(0)
8993

9094
-- Iteration 3 --
@@ -121,9 +125,13 @@ abs(): Argument #1 ($num) must be of type int|float, string given
121125
abs(): Argument #1 ($num) must be of type int|float, classA given
122126

123127
-- Iteration 14 --
128+
129+
Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
124130
int(0)
125131

126132
-- Iteration 15 --
133+
134+
Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
127135
int(0)
128136

129137
-- Iteration 16 --

ext/standard/tests/math/ceil_basic.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for ($i = 0; $i < count($values); $i++) {
3333
}
3434

3535
?>
36-
--EXPECT--
36+
--EXPECTF--
3737
*** Testing ceil() : basic functionality ***
3838
float(0)
3939
float(0)
@@ -54,4 +54,6 @@ float(-3950)
5454
float(39)
5555
float(1)
5656
float(0)
57+
58+
Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
5759
float(0)

ext/standard/tests/math/ceil_variation1.phpt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ foreach($inputs as $input) {
7171
};
7272
fclose($fp);
7373
?>
74-
--EXPECT--
74+
--EXPECTF--
7575
*** Testing ceil() : usage variations ***
7676

7777
-- Iteration 1 --
78+
79+
Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
7880
float(0)
7981

8082
-- Iteration 2 --
83+
84+
Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
8185
float(0)
8286

8387
-- Iteration 3 --
@@ -114,9 +118,13 @@ ceil(): Argument #1 ($num) must be of type int|float, string given
114118
ceil(): Argument #1 ($num) must be of type int|float, classA given
115119

116120
-- Iteration 14 --
121+
122+
Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
117123
float(0)
118124

119125
-- Iteration 15 --
126+
127+
Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
120128
float(0)
121129

122130
-- Iteration 16 --

ext/standard/tests/math/floor_basic.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ foreach($values as $value) {
3333
};
3434

3535
?>
36-
--EXPECT--
36+
--EXPECTF--
3737
*** Testing floor() : basic functionality ***
3838

3939
-- floor 0 --
@@ -94,4 +94,6 @@ float(1)
9494
float(0)
9595

9696
-- floor --
97+
98+
Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
9799
float(0)

ext/standard/tests/math/floor_variation1.phpt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ foreach($inputs as $input) {
7171
};
7272
fclose($fp);
7373
?>
74-
--EXPECT--
74+
--EXPECTF--
7575
*** Testing floor() : usage variations ***
7676

7777
-- Iteration 1 --
78+
79+
Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
7880
float(0)
7981

8082
-- Iteration 2 --
83+
84+
Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
8185
float(0)
8286

8387
-- Iteration 3 --
@@ -114,9 +118,13 @@ floor(): Argument #1 ($num) must be of type int|float, string given
114118
floor(): Argument #1 ($num) must be of type int|float, classA given
115119

116120
-- Iteration 14 --
121+
122+
Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
117123
float(0)
118124

119125
-- Iteration 15 --
126+
127+
Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
120128
float(0)
121129

122130
-- Iteration 16 --

ext/standard/tests/math/round_variation1.phpt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ foreach($inputs as $input) {
8585
};
8686
fclose($fp);
8787
?>
88-
--EXPECT--
88+
--EXPECTF--
8989
*** Testing round() : usage variations ***
9090

9191
-- Iteration 1 --
@@ -119,9 +119,13 @@ float(1.23457E-9)
119119
float(0.5)
120120

121121
-- Iteration 11 --
122+
123+
Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
122124
float(0)
123125

124126
-- Iteration 12 --
127+
128+
Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
125129
float(0)
126130

127131
-- Iteration 13 --
@@ -158,9 +162,13 @@ round(): Argument #1 ($num) must be of type int|float, string given
158162
round(): Argument #1 ($num) must be of type int|float, classA given
159163

160164
-- Iteration 24 --
165+
166+
Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
161167
float(0)
162168

163169
-- Iteration 25 --
170+
171+
Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
164172
float(0)
165173

166174
-- Iteration 26 --

ext/standard/tests/password/password_verify.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bool(false)
2626
bool(false)
2727
bool(true)
2828

29-
Deprecated: password_verify(): Passing null to parameter of type string is deprecated in %s on line %d
29+
Deprecated: password_verify(): Passing null to parameter #2 ($hash) of type string is deprecated in %s on line %d
3030
bool(false)
3131
bool(true)
3232
bool(false)
22 Bytes
Binary file not shown.

ext/standard/tests/strings/sha1_file.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ bool(false)
8888

8989
-- NULL as filename --
9090

91-
Deprecated: sha1_file(): Passing null to parameter of type string is deprecated in %s on line %d
91+
Deprecated: sha1_file(): Passing null to parameter #1 ($filename) of type string is deprecated in %s on line %d
9292
Path cannot be empty
9393

9494
-- Hexadecimal Output for Empty file as Argument --

ext/standard/tests/strings/str_replace_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ int(2)
271271

272272
-- Iteration 8 --
273273

274-
Deprecated: str_replace(): Passing null to parameter of type string is deprecated in %s on line %d
274+
Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in %s on line %d
275275

276276
Warning: Array to string conversion in %s on line %d
277277
array(12) {
54 Bytes
Binary file not shown.
54 Bytes
Binary file not shown.

ext/standard/tests/strings/strtr_variation6.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ string(6) "0a2atm"
104104
string(6) "012atm"
105105
-- Iteration 14 --
106106

107-
Deprecated: strtr(): Passing null to parameter of type string is deprecated in %s on line %d
107+
Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
108108
string(6) "012atm"
109109
-- Iteration 15 --
110110

111-
Deprecated: strtr(): Passing null to parameter of type string is deprecated in %s on line %d
111+
Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
112112
string(6) "012atm"
113113
-- Iteration 16 --
114114
string(6) "012ttm"

ext/standard/tests/strings/strtr_variation8.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ strtr(): Argument #2 ($from) must be of type array, string given
118118

119119
-- Iteration 14 --
120120

121-
Deprecated: strtr(): Passing null to parameter of type string is deprecated in %s on line %d
121+
Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
122122
strtr(): Argument #2 ($from) must be of type array, string given
123123

124124
-- Iteration 15 --
125125

126-
Deprecated: strtr(): Passing null to parameter of type string is deprecated in %s on line %d
126+
Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
127127
strtr(): Argument #2 ($from) must be of type array, string given
128128

129129
-- Iteration 16 --

0 commit comments

Comments
 (0)