Skip to content

Commit 756f797

Browse files
committed
Update tests (WIP)
1 parent e42f342 commit 756f797

File tree

70 files changed

+102
-3568
lines changed

Some content is hidden

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

70 files changed

+102
-3568
lines changed

Zend/tests/bug43201.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,37 @@ Warning: Undefined variable $ref in %s on line %d
3030

3131
Warning: Undefined variable $undef in %s on line %d
3232

33+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
34+
3335
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
3436

3537
Warning: Undefined variable $undef in %s on line %d
3638

39+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
40+
3741
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
3842

3943
Warning: Undefined variable $undef in %s on line %d
4044

45+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
46+
4147
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
4248

4349
Warning: Undefined variable $undef in %s on line %d
4450

51+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
52+
4553
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
4654

4755
Warning: Undefined variable $undef in %s on line %d
4856

57+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
58+
4959
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
5060

5161
Warning: Undefined variable $undef in %s on line %d
5262

63+
Deprecated: chop(): Passing null to argument of type string is deprecated in %s on line %d
64+
5365
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
5466
ok

Zend/tests/bug64677.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class cat {
77
}
88
}
99
$cat = new cat();
10-
$cat->show_output('Files: ', trim(`cd .`)); // this gives invalid args to shell_exec
10+
$cat->show_output('Files: ', trim((string) `cd .`)); // this gives invalid args to shell_exec
1111
$cat->show_output('Files: ', `cd .`); // this causes a segmentation fault
1212
$cat->show_output(`cd .`); // this causes a segmentation fault
1313

Zend/tests/class_exists_002.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ class foo {
88
}
99

1010
var_dump(class_exists(''));
11-
var_dump(class_exists(NULL));
1211
var_dump(class_exists('FOO'));
1312
var_dump(class_exists('bar'));
1413
var_dump(class_exists(1));
1514

1615
?>
1716
--EXPECT--
1817
bool(false)
19-
bool(false)
2018
bool(true)
2119
bool(false)
2220
bool(false)

Zend/tests/exception_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ try {
77
try {
88
try {
99
try {
10-
throw new Exception(NULL);
10+
throw new Exception();
1111
} catch (Exception $e) {
1212
var_dump($e->getMessage());
1313
throw $e;

Zend/tests/interface_exists_001.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ interface foo {
88

99
var_dump(interface_exists('foo'));
1010
var_dump(interface_exists(1));
11-
var_dump(interface_exists(NULL));
1211

1312
?>
1413
--EXPECT--
1514
bool(true)
1615
bool(false)
17-
bool(false)

Zend/tests/nullsafe_operator/013.phpt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,21 @@ dump_error(fn() => array_key_exists('foo', $foo?->foo()));
3838

3939
?>
4040
--EXPECTF--
41+
Deprecated: {closure}(): Passing null to argument of type string is deprecated in %s on line %d
4142
int(0)
4243
bool(true)
4344
bool(false)
4445
bool(false)
4546
bool(false)
4647
bool(false)
48+
49+
Deprecated: defined(): Passing null to argument of type string is deprecated in %s on line %d
4750
bool(false)
51+
52+
Deprecated: chr(): Passing null to argument of type int is deprecated in %s on line %d
4853
string(1) "%s"
54+
55+
Deprecated: ord(): Passing null to argument of type string is deprecated in %s on line %d
4956
int(0)
5057
string(98) "call_user_func_array(): Argument #1 ($function) must be a valid callback, no array or string given"
5158
string(77) "call_user_func_array(): Argument #2 ($args) must be of type array, null given"
@@ -55,6 +62,8 @@ string(4) "NULL"
5562
string(52) "func_num_args() expects exactly 0 arguments, 1 given"
5663
string(52) "func_get_args() expects exactly 0 arguments, 1 given"
5764
string(69) "array_slice(): Argument #1 ($array) must be of type array, null given"
65+
66+
Deprecated: array_slice(): Passing null to argument of type int is deprecated in %s on line %d
5867
array(1) {
5968
[0]=>
6069
string(3) "foo"

Zend/tests/str_or_obj_of_class_zpp.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ try {
5151
}
5252

5353
?>
54-
--EXPECT--
54+
--EXPECTF--
5555
string(6) "string"
5656
string(1) "1"
57+
58+
Deprecated: zend_string_or_stdclass(): Passing null to argument of type string is deprecated in %s on line %d
5759
string(0) ""
5860
object(stdClass)#1 (0) {
5961
}

Zend/tests/str_or_obj_zpp.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ try {
3434
}
3535

3636
?>
37-
--EXPECT--
37+
--EXPECTF--
3838
string(6) "string"
3939
string(1) "1"
40+
41+
Deprecated: zend_string_or_object(): Passing null to argument of type string is deprecated in %s on line %d
4042
string(0) ""
4143
object(stdClass)#1 (0) {
4244
}

Zend/tests/trait_exists_001.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ trait foo {
88

99
var_dump(trait_exists('foo'));
1010
var_dump(trait_exists(1));
11-
var_dump(trait_exists(NULL));
1211

1312
?>
1413
--EXPECT--
1514
bool(true)
1615
bool(false)
17-
bool(false)

ext/standard/tests/array/array_filter_variation9.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Test array_filter() function : usage variations - built-in functions as 'callbac
88

99
echo "*** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***\n";
1010

11-
$input = array(0, 1, -1, 10, 100, 1000, null);
11+
$input = array(0, 1, -1, 10, 100, 1000);
1212

1313
// using built-in function 'is_int' as 'callback'
1414
var_dump( array_filter($input, 'is_int') );
@@ -48,7 +48,7 @@ array(6) {
4848
[5]=>
4949
int(1000)
5050
}
51-
array(7) {
51+
array(6) {
5252
[0]=>
5353
int(0)
5454
[1]=>
@@ -61,8 +61,6 @@ array(7) {
6161
int(100)
6262
[5]=>
6363
int(1000)
64-
[6]=>
65-
NULL
6664
}
6765
array_filter(): Argument #2 ($callback) must be a valid callback, function "echo" not found or invalid function name
6866
array_filter(): Argument #2 ($callback) must be a valid callback, function "exit" not found or invalid function name

0 commit comments

Comments
 (0)