Annotation of embedaddon/php/ext/reflection/tests/ReflectionObject_constructor_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ReflectionObject::__construct - invalid arguments
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(new ReflectionObject());
! 7: var_dump(new ReflectionObject('stdClass'));
! 8: $myInstance = new stdClass;
! 9: var_dump(new ReflectionObject($myInstance, $myInstance));
! 10: var_dump(new ReflectionObject(0));
! 11: var_dump(new ReflectionObject(null));
! 12: var_dump(new ReflectionObject(array(1,2)));
! 13: ?>
! 14: --EXPECTF--
! 15: Warning: ReflectionObject::__construct() expects exactly 1 parameter, 0 given in %s on line 3
! 16: object(ReflectionObject)#%d (1) {
! 17: ["name"]=>
! 18: string(0) ""
! 19: }
! 20:
! 21: Warning: ReflectionObject::__construct() expects parameter 1 to be object, string given in %s on line 4
! 22: object(ReflectionObject)#%d (1) {
! 23: ["name"]=>
! 24: string(0) ""
! 25: }
! 26:
! 27: Warning: ReflectionObject::__construct() expects exactly 1 parameter, 2 given in %s on line 6
! 28: object(ReflectionObject)#%d (1) {
! 29: ["name"]=>
! 30: string(0) ""
! 31: }
! 32:
! 33: Warning: ReflectionObject::__construct() expects parameter 1 to be object, integer given in %s on line 7
! 34: object(ReflectionObject)#%d (1) {
! 35: ["name"]=>
! 36: string(0) ""
! 37: }
! 38:
! 39: Warning: ReflectionObject::__construct() expects parameter 1 to be object, null given in %s on line 8
! 40: object(ReflectionObject)#%d (1) {
! 41: ["name"]=>
! 42: string(0) ""
! 43: }
! 44:
! 45: Warning: ReflectionObject::__construct() expects parameter 1 to be object, array given in %s on line 9
! 46: object(ReflectionObject)#%d (1) {
! 47: ["name"]=>
! 48: string(0) ""
! 49: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>