Annotation of embedaddon/php/ext/reflection/tests/ReflectionClass_FileInfo_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ReflectionClass::getFileName(), ReflectionClass::getStartLine(), ReflectionClass::getEndLine() - bad params
! 3: --FILE--
! 4: <?php
! 5: Class C { }
! 6:
! 7: $rc = new ReflectionClass("C");
! 8: $methods = array("getFileName", "getStartLine", "getEndLine");
! 9:
! 10: foreach ($methods as $method) {
! 11: var_dump($rc->$method());
! 12: var_dump($rc->$method(null));
! 13: var_dump($rc->$method('X', 0));
! 14: }
! 15: ?>
! 16: --EXPECTF--
! 17: string(%d) "%s"
! 18:
! 19: Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
! 20: NULL
! 21:
! 22: Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d
! 23: NULL
! 24: int(2)
! 25:
! 26: Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
! 27: NULL
! 28:
! 29: Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d
! 30: NULL
! 31: int(2)
! 32:
! 33: Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
! 34: NULL
! 35:
! 36: Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d
! 37: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>