Skip to content

Commit 4e9afbd

Browse files
committed
update core tests
1 parent 6eb8b21 commit 4e9afbd

File tree

9 files changed

+41
-112
lines changed

9 files changed

+41
-112
lines changed

Zend/tests/014.phpt

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,36 @@ echo "Done\n";
2323
--EXPECTF--
2424
array(1) {
2525
[0]=>
26-
string(%d) "%s"
26+
string(37) "%s"
2727
}
2828
array(2) {
2929
[0]=>
30-
string(%d) "%s"
30+
string(37) "%s"
3131
[1]=>
32-
string(%d) "%s"
32+
string(37) "%s"
3333
}
34-
35-
Warning: get_included_files() expects exactly 0 parameters, 2 given in %s on line %d
36-
NULL
3734
array(2) {
3835
[0]=>
39-
string(%d) "%s"
36+
string(37) "%s"
4037
[1]=>
41-
string(%d) "%s"
38+
string(37) "%s"
39+
}
40+
array(2) {
41+
[0]=>
42+
string(37) "%s"
43+
[1]=>
44+
string(37) "%s"
45+
}
46+
array(2) {
47+
[0]=>
48+
string(37) "%s"
49+
[1]=>
50+
string(37) "%s"
4251
}
43-
44-
Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
45-
NULL
4652
array(2) {
4753
[0]=>
48-
string(%d) "%s"
54+
string(37) "%s"
4955
[1]=>
50-
string(%d) "%s"
56+
string(37) "%s"
5157
}
5258
Done

Zend/tests/017.phpt

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ var_dump(get_loaded_extensions(true, true));
1818

1919
define("USER_CONSTANT", "test");
2020

21-
var_dump(get_defined_constants(true, true));
2221
var_dump(gettype(get_defined_constants(true)));
2322
var_dump(gettype(get_defined_constants()));
2423
var_dump(count(get_defined_constants()));
24+
var_dump(count(get_defined_constants(true, true)));
2525

2626
function test () {
2727
}
2828

29-
var_dump(get_defined_functions(true));
3029
var_dump(gettype(get_defined_functions()));
3130
var_dump(count(get_defined_functions()));
31+
var_dump(count(get_defined_functions(true)));
3232

33-
var_dump(get_declared_interfaces(true));
3433
var_dump(gettype(get_declared_interfaces()));
3534
var_dump(count(get_declared_interfaces()));
35+
var_dump(count(get_declared_interfaces(true)));
3636

3737
var_dump(get_extension_funcs());
3838
var_dump(get_extension_funcs(true));
@@ -45,42 +45,35 @@ var_dump(count(get_extension_funcs("zend")));
4545
echo "Done\n";
4646
?>
4747
--EXPECTF--
48-
Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
48+
Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line 3
4949
NULL
5050

51-
Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d
51+
Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line 4
5252
NULL
5353
string(6) "stream"
5454
string(7) "Unknown"
5555
string(5) "array"
56-
int(%d)
56+
int(9)
5757
string(5) "array"
58-
int(%d)
59-
60-
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
61-
NULL
62-
63-
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
64-
NULL
58+
int(0)
59+
array(0) {
60+
}
6561
string(5) "array"
6662
string(5) "array"
67-
int(%d)
68-
69-
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
70-
NULL
63+
int(475)
64+
int(7)
7165
string(5) "array"
72-
int(%d)
73-
74-
Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d
75-
NULL
66+
int(2)
67+
int(2)
7668
string(5) "array"
77-
int(%d)
69+
int(14)
70+
int(14)
7871

79-
Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
72+
Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line 34
8073
NULL
8174
bool(false)
8275
string(5) "array"
83-
int(%d)
76+
int(530)
8477
string(5) "array"
85-
int(%d)
78+
int(60)
8679
Done

Zend/tests/018.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo "Done\n";
2121
Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
2222
NULL
2323

24-
Warning: constant() expects exactly 1 parameter, 2 given in %s on line %d
24+
Warning: constant(): Couldn't find constant in %s on line %d
2525
NULL
2626

2727
Warning: constant(): Couldn't find constant in %s on line %d

Zend/tests/020.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ foo(1,2);
2020
echo "Done\n";
2121
?>
2222
--EXPECTF--
23-
Warning: func_get_arg() expects exactly 1 parameter, 3 given in %s on line %d
24-
NULL
23+
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
24+
bool(false)
2525

2626
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
2727
bool(false)

Zend/tests/closure_040.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ $cas = $a->getStaticIncrementor();
2626

2727
$ca->bindTo($a, array());
2828
$ca->bindTo(array(), 'A');
29-
$ca->bindTo($a, array(), "");
3029
$ca->bindTo();
3130
$cas->bindTo($a, 'A');
3231

@@ -38,8 +37,6 @@ Warning: Class 'Array' not found in %s on line %d
3837

3938
Warning: Closure::bindTo() expects parameter 1 to be object, array given in %s on line 25
4039

41-
Warning: Closure::bindTo() expects at most 2 parameters, 3 given in %s on line %d
42-
4340
Warning: Closure::bindTo() expects at least 1 parameter, 0 given in %s on line %d
4441

4542
Warning: Cannot bind an instance to a static closure in %s on line %d

Zend/tests/exception_010.phpt

Lines changed: 0 additions & 30 deletions
This file was deleted.

Zend/tests/exception_handler_004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Warning: set_exception_handler() expects the argument (::) to be a valid callbac
1717

1818
Warning: set_exception_handler() expects exactly 1 parameter, 0 given in %s on line %d
1919

20-
Warning: set_exception_handler() expects exactly 1 parameter, 2 given in %s on line %d
20+
Warning: set_exception_handler() expects the argument (foo) to be a valid callback in %s on line %d
2121
Done

Zend/tests/function_exists_error.phpt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ echo "*** Testing function_exists() : error conditions ***\n";
1212
$arg_0 = "ABC";
1313
$extra_arg = 1;
1414

15-
echo "\nToo many arguments\n";
16-
var_dump(function_exists($arg_0, $extra_arg));
17-
1815
echo "\nToo few arguments\n";
1916
var_dump(function_exists());
2017

@@ -23,11 +20,6 @@ var_dump(function_exists());
2320
--EXPECTF--
2421
*** Testing function_exists() : error conditions ***
2522

26-
Too many arguments
27-
28-
Warning: function_exists() expects exactly 1 parameter, 2 given in %s on line %d
29-
NULL
30-
3123
Too few arguments
3224

3325
Warning: function_exists() expects exactly 1 parameter, 0 given in %s on line %d

Zend/tests/get_defined_functions_error.phpt

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)