php-src/ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt
Felipe Pena ef7eb282fd - New parameter parsing
- Removed METHOD_NOTSTATIC_NUMPARAMS
2009-01-07 22:37:08 +00:00

28 lines
522 B
PHP

--TEST--
Test ReflectionProperty::getDeclaringClass() with inherited properties.
--FILE--
<?php
class A {
public $prop;
}
class B extends A {
}
$propInfo = new ReflectionProperty('B', 'prop');
var_dump($propInfo->getDeclaringClass());
echo "Wrong number of params:\n";
$propInfo->getDeclaringClass(1);
?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
[u"name"]=>
unicode(1) "A"
}
Wrong number of params:
Warning: ReflectionProperty::getDeclaringClass() expects exactly 0 parameters, 1 given in %s on line %d