summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionObject_isInstantiable_error.phpt
blob: f24958421f0ddfa387c4e6a0f1257cc1b4852cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
ReflectionObject::IsInstantiable() - invalid params
--FILE--
<?php
class privateCtornew {
	private function __construct() {}
	public static function reflectionObjectFactory() {
		return new ReflectionObject(new self);
	}
}
$reflectionObject = privateCtorNew::reflectionObjectFactory();

var_dump($reflectionObject->IsInstantiable('X'));
var_dump($reflectionObject->IsInstantiable(0, null));

?>
--EXPECTF--
Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d
NULL

Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d
NULL