SplFileInfo_getInode_error.phpt 761 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. SPL: Spl File Info test getPerms
  3. --CREDITS--
  4. Cesare D'Amico <cesare.damico@gruppovolta.it>
  5. Andrea Giorgini <agiorg@gmail.com>
  6. Filippo De Santis <fd@ideato.it>
  7. Daniel Londero <daniel.londero@gmail.com>
  8. Francesco Trucchia <ft@ideato.it>
  9. Jacopo Romei <jacopo@sviluppoagile.it>
  10. #Test Fest Cesena (Italy) on 2009-06-20
  11. --SKIPIF--
  12. <?php
  13. if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test not for Windows platforms");
  14. ?>
  15. --FILE--
  16. <?php
  17. //file
  18. $fileInfo = new SplFileInfo('not_existing');
  19. var_dump($fileInfo->getInode());
  20. ?>
  21. --EXPECTF--
  22. Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getInode(): stat failed for not_existing' in %s
  23. Stack trace:
  24. #0 %s: SplFileInfo->getInode()
  25. #1 {main}
  26. thrown in %s on line %d