Skip to content

Commit 09301ea

Browse files
committed
update core tests
1 parent 31e2033 commit 09301ea

File tree

9 files changed

+39
-110
lines changed

9 files changed

+39
-110
lines changed

Zend/tests/014.phpt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,24 @@ array(2) {
3131
[1]=>
3232
string(%d) "%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]=>
3936
string(%d) "%s"
4037
[1]=>
4138
string(%d) "%s"
4239
}
43-
44-
Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
45-
NULL
40+
array(2) {
41+
[0]=>
42+
string(%d) "%s"
43+
[1]=>
44+
string(%d) "%s"
45+
}
46+
array(2) {
47+
[0]=>
48+
string(%d) "%s"
49+
[1]=>
50+
string(%d) "%s"
51+
}
4652
array(2) {
4753
[0]=>
4854
string(%d) "%s"

Zend/tests/017.phpt

Lines changed: 21 additions & 28 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
53-
string(6) "stream"
54-
string(7) "Unknown"
55-
string(5) "array"
53+
string(%d) "stream"
54+
string(%d) "Unknown"
55+
string(%d) "array"
5656
int(%d)
57-
string(5) "array"
57+
string(%d) "array"
5858
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
65-
string(5) "array"
66-
string(5) "array"
59+
array(0) {
60+
}
61+
string(%d) "array"
62+
string(%d) "array"
6763
int(%d)
68-
69-
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
70-
NULL
71-
string(5) "array"
7264
int(%d)
73-
74-
Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d
75-
NULL
76-
string(5) "array"
65+
string(%d) "array"
66+
int(%d)
67+
int(%d)
68+
string(%d) "array"
69+
int(%d)
7770
int(%d)
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)
82-
string(5) "array"
75+
string(%d) "array"
8376
int(%d)
84-
string(5) "array"
77+
string(%d) "array"
8578
int(%d)
8679
Done

Zend/tests/018.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ 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
2828
NULL
2929

3030
Warning: constant() expects parameter 1 to be string, array given in %s on line %d
3131
NULL
32-
int(1)
33-
string(4) "test"
32+
int(%d)
33+
string(%d) "test"
3434
Done

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)