SplFileInfo_getPerms_basic.phpt 733 B

123456789101112131415161718192021222324252627282930
  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. touch ('SplFileInfo_getPerms_basic.txt');
  19. chmod('SplFileInfo_getPerms_basic.txt', 0557);
  20. $fileInfo = new SplFileInfo('SplFileInfo_getPerms_basic.txt');
  21. var_dump($fileInfo->getPerms() == 0100557);
  22. ?>
  23. --CLEAN--
  24. <?php
  25. unlink('SplFileInfo_getPerms_basic.txt');
  26. ?>
  27. --EXPECT--
  28. bool(true)