diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index d9bf0f5668b..5f3b324b61e 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,4 +53,4 @@ int(2) object(foo)#%d (0) { } -Fatal error: Argument 1 passed to typehint() must be an object of class foo in %s on line %d +Catchable fatal error: Argument 1 passed to typehint() must be an object of class foo in %s on line %d diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index 2b5f6c82876..dc14706a362 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -23,4 +23,4 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, called in %s on line 16 and defined in %s on line 9 +Catchable fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, called in %s on line 16 and defined in %s on line 9 diff --git a/tests/lang/type_hints_002.phpt b/tests/lang/type_hints_002.phpt new file mode 100644 index 00000000000..b21240a7923 --- /dev/null +++ b/tests/lang/type_hints_002.phpt @@ -0,0 +1,28 @@ +--TEST-- +ZE2 type hinting +--SKIPIF-- + +--FILE-- +f(new P); +$o->f(); +$o->f(NULL); +?> +--EXPECT-- +object(P)#2 (0) { +} +- +NULL +- +NULL +- + diff --git a/tests/lang/type_hints_003.phpt b/tests/lang/type_hints_003.phpt new file mode 100644 index 00000000000..0ef3e3516bd --- /dev/null +++ b/tests/lang/type_hints_003.phpt @@ -0,0 +1,14 @@ +--TEST-- +ZE2 type hinting +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Fatal error: Default value for parameters with a class type hint can only be NULL in %stype_hints_003.php on line 3