ReflectionClass_isSubclassOf_error1.phpt 370 B

12345678910111213141516
  1. --TEST--
  2. ReflectionClass::isSubclassOf() - non-existent class error
  3. --FILE--
  4. <?php
  5. class A {}
  6. $rc = new ReflectionClass('A');
  7. var_dump($rc->isSubclassOf('X'));
  8. ?>
  9. --EXPECTF--
  10. Fatal error: Uncaught exception 'ReflectionException' with message 'Class X does not exist' in %s:5
  11. Stack trace:
  12. #0 %s(5): ReflectionClass->isSubclassOf('X')
  13. #1 {main}
  14. thrown in %s on line 5