ReflectionClass_FileInfo_error.phpt 1019 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. ReflectionClass::getFileName(), ReflectionClass::getStartLine(), ReflectionClass::getEndLine() - bad params
  3. --FILE--
  4. <?php
  5. Class C { }
  6. $rc = new ReflectionClass("C");
  7. $methods = array("getFileName", "getStartLine", "getEndLine");
  8. foreach ($methods as $method) {
  9. var_dump($rc->$method());
  10. var_dump($rc->$method(null));
  11. var_dump($rc->$method('X', 0));
  12. }
  13. ?>
  14. --EXPECTF--
  15. string(%d) "%s"
  16. Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
  17. NULL
  18. Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d
  19. NULL
  20. int(2)
  21. Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
  22. NULL
  23. Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d
  24. NULL
  25. int(2)
  26. Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
  27. NULL
  28. Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d
  29. NULL