ReflectionProperty_getDocComment_error.phpt 734 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Test ReflectionProperty::getDocComment() errors.
  3. --FILE--
  4. <?php
  5. class C {
  6. public $a;
  7. }
  8. $rc = new ReflectionProperty('C', 'a');
  9. var_dump($rc->getDocComment(null));
  10. var_dump($rc->getDocComment('X'));
  11. var_dump($rc->getDocComment(true));
  12. var_dump($rc->getDocComment(array(1, 2, 3)));
  13. ?>
  14. --EXPECTF--
  15. Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
  16. NULL
  17. Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
  18. NULL
  19. Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
  20. NULL
  21. Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
  22. NULL