opendir-003.phpt 715 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. opendir() with 'ftps://' stream.
  3. --EXTENSIONS--
  4. openssl
  5. --SKIPIF--
  6. <?php
  7. if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available.");
  8. if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available.");
  9. ?>
  10. --FILE--
  11. <?php
  12. $ssl=true;
  13. require __DIR__ . "/../../../ftp/tests/server.inc";
  14. $path="ftps://127.0.0.1:" . $port."/bogusdir";
  15. $context = stream_context_create(array('ssl' => array('cafile' => __DIR__ . '/../../../ftp/tests/cert.pem')));
  16. var_dump(opendir($path, $context));
  17. ?>
  18. --EXPECTF--
  19. Warning: opendir(ftps://127.0.0.1:%d/bogusdir): Failed to open directory: FTP server reports 250 /bogusdir: No such file or directory
  20. in %s on line %d
  21. bool(false)