Annotation of embedaddon/php/ext/reflection/tests/ReflectionClass_FileInfo_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ReflectionClass::getFileName(), ReflectionClass::getStartLine(), ReflectionClass::getEndLine()
! 3: --FILE--
! 4: <?php
! 5: //New instance of class C - defined below
! 6: $rc = new ReflectionClass("C");
! 7:
! 8: //Get the file name of the PHP script in which C is defined
! 9: var_dump($rc->getFileName());
! 10:
! 11: //Get the line number at the start of the definition of class C
! 12: var_dump($rc->getStartLine());
! 13:
! 14: //Get the line number at the end of the definition of class C
! 15: var_dump($rc->getEndLine());
! 16:
! 17: //Same tests as above but stdclass is internal - so all results should be false.
! 18: $rc = new ReflectionClass("stdClass");
! 19: var_dump($rc->getFileName());
! 20: var_dump($rc->getStartLine());
! 21: var_dump($rc->getEndLine());
! 22:
! 23: Class C {
! 24:
! 25: }
! 26: ?>
! 27: --EXPECTF--
! 28: string(%d) "%sReflectionClass_FileInfo_basic.php"
! 29: int(20)
! 30: int(22)
! 31: bool(false)
! 32: bool(false)
! 33: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>