Skip to content

Commit a7a354e

Browse files
committed
Update tests after error message change (WIP)
1 parent c5080bd commit a7a354e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+105
-63
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/filter/tests/057.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ foreach (array(null, true, false, 1, "", new stdClass) as $invalid) {
1919
}
2020
?>
2121
--EXPECTF--
22-
Deprecated: filter_input_array(): Passing null to parameter of type int is deprecated in %s on line %d
22+
Deprecated: filter_input_array(): Passing null to parameter #2 ($options) of type array|int is deprecated in %s on line %d
2323

2424
Warning: filter_input_array(): Unknown filter with ID 0 in %s on line %d
2525
bool(false)
2626

27-
Deprecated: filter_var_array(): Passing null to parameter of type int is deprecated in %s on line %d
27+
Deprecated: filter_var_array(): Passing null to parameter #2 ($options) of type array|int is deprecated in %s on line %d
2828

2929
Warning: filter_var_array(): Unknown filter with ID 0 in %s on line %d
3030
bool(false)

ext/hash/tests/hash_init_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ hash_init(): Argument #1 ($algo) must be a cryptographic hashing algorithm if HM
4949
-- Testing hash_init() function with HASH_HMAC and no key --
5050
hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested
5151

52-
Deprecated: hash_init(): Passing null to parameter of type string is deprecated in %s on line %d
52+
Deprecated: hash_init(): Passing null to parameter #3 ($key) of type string is deprecated in %s on line %d
5353
hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested

ext/intl/tests/bug48227.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ foreach (['', 1, NULL, $x] as $value) {
1515
}
1616

1717
?>
18-
--EXPECT--
18+
--EXPECTF--
1919
NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
2020
string(1) "1"
21+
22+
Deprecated: NumberFormatter::format(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
2123
string(1) "0"
2224
NumberFormatter::format(): Argument #1 ($num) must be of type int|float, NumberFormatter given

ext/intl/tests/formatter_fail.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ ArgumentCountError: NumberFormatter::create() expects at least 2 arguments, 0 gi
107107
Error: NumberFormatter object is already constructed in %s on line %d
108108
'U_ZERO_ERROR'
109109

110-
Deprecated: NumberFormatter::__construct(): Passing null to parameter of type string is deprecated in %s on line %d
110+
Deprecated: NumberFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
111111

112-
Deprecated: NumberFormatter::__construct(): Passing null to parameter of type int is deprecated in %s on line %d
112+
Deprecated: NumberFormatter::__construct(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
113113

114-
Deprecated: NumberFormatter::create(): Passing null to parameter of type string is deprecated in %s on line %d
114+
Deprecated: NumberFormatter::create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
115115

116-
Deprecated: NumberFormatter::create(): Passing null to parameter of type int is deprecated in %s on line %d
116+
Deprecated: NumberFormatter::create(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
117117

118-
Deprecated: numfmt_create(): Passing null to parameter of type string is deprecated in %s on line %d
118+
Deprecated: numfmt_create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
119119

120-
Deprecated: numfmt_create(): Passing null to parameter of type int is deprecated in %s on line %d
120+
Deprecated: numfmt_create(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
121121

122122
IntlException: Constructor failed in %s on line %d
123123
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'

ext/intl/tests/msgfmt_fail2.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@ ArgumentCountError: msgfmt_create() expects exactly 2 arguments, 1 given in %s o
126126
ArgumentCountError: MessageFormatter::create() expects exactly 2 arguments, 1 given in %s on line %d
127127
'U_ZERO_ERROR'
128128

129-
Deprecated: MessageFormatter::__construct(): Passing null to parameter of type string is deprecated in %s on line %d
129+
Deprecated: MessageFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
130130

131-
Deprecated: MessageFormatter::__construct(): Passing null to parameter of type string is deprecated in %s on line %d
131+
Deprecated: MessageFormatter::__construct(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
132132

133133
IntlException: msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR in %s on line %d
134134
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
135135

136-
Deprecated: MessageFormatter::create(): Passing null to parameter of type string is deprecated in %s on line %d
136+
Deprecated: MessageFormatter::create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
137137

138-
Deprecated: MessageFormatter::create(): Passing null to parameter of type string is deprecated in %s on line %d
138+
Deprecated: MessageFormatter::create(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
139139
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
140140

141-
Deprecated: msgfmt_create(): Passing null to parameter of type string is deprecated in %s on line %d
141+
Deprecated: msgfmt_create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
142142

143-
Deprecated: msgfmt_create(): Passing null to parameter of type string is deprecated in %s on line %d
143+
Deprecated: msgfmt_create(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
144144
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
145145

146146
IntlException: msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR in %s on line %d

ext/json/tests/001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ NULL
3232
NULL
3333
NULL
3434

35-
Deprecated: json_decode(): Passing null to parameter of type string is deprecated in %s on line %d
35+
Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in %s on line %d
3636
NULL
3737
object(stdClass)#%d (1) {
3838
["test"]=>

0 commit comments

Comments
 (0)