2007-07-12 21:03:39 +00:00
|
|
|
--TEST--
|
|
|
|
ReflectionObject::getFileName(), ReflectionObject::getStartLine(), ReflectionObject::getEndLine() -invalid aparams
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
Class C { }
|
|
|
|
|
|
|
|
$rc = new ReflectionObject(new C);
|
|
|
|
$methods = array("getFileName", "getStartLine", "getEndLine");
|
|
|
|
|
|
|
|
foreach ($methods as $method) {
|
|
|
|
var_dump($rc->$method());
|
|
|
|
var_dump($rc->$method(null));
|
|
|
|
var_dump($rc->$method('X', 0));
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
string(%d) "%s"
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|
|
|
|
int(2)
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|
|
|
|
int(2)
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|
|
|
|
|
2009-01-07 22:40:17 +00:00
|
|
|
Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d
|
2007-07-12 21:03:39 +00:00
|
|
|
NULL
|