bug69655.phpt 919 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #69655 (php -S changes MKCALENDAR request method to MKCOL)
  3. --INI--
  4. allow_url_fopen=1
  5. --SKIPIF--
  6. <?php
  7. include "skipif.inc";
  8. ?>
  9. --FILE--
  10. <?php
  11. include "php_cli_server.inc";
  12. php_cli_server_start();
  13. foreach (['MKCO', 'MKCOLL', 'M'] as $method) {
  14. $context = stream_context_create(['http' => ['method' => $method]]);
  15. // the following is supposed to emit a warning for unsupported methods
  16. file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS, false, $context);
  17. }
  18. ?>
  19. --EXPECTF--
  20. Warning: file_get_contents(http://localhost:%d): Failed to open stream: HTTP request failed! HTTP/1.1 501 Not Implemented
  21. in %s on line %d
  22. Warning: file_get_contents(http://localhost:%d): Failed to open stream: HTTP request failed! HTTP/1.1 501 Not Implemented
  23. in %s on line %d
  24. Warning: file_get_contents(http://localhost:%d): Failed to open stream: HTTP request failed! HTTP/1.1 501 Not Implemented
  25. in %s on line %d