bootstrap.php 620 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace GuzzleHttp\Test {
  3. require __DIR__ . '/../vendor/autoload.php';
  4. require __DIR__ . '/Server.php';
  5. use GuzzleHttp\Tests\Server;
  6. Server::start();
  7. register_shutdown_function(function () {
  8. Server::stop();
  9. });
  10. }
  11. // Override curl_setopt_array() to get the last set curl options
  12. namespace GuzzleHttp\Handler {
  13. function curl_setopt_array($handle, array $options)
  14. {
  15. if (!empty($_SERVER['curl_test'])) {
  16. $_SERVER['_curl'] = $options;
  17. } else {
  18. unset($_SERVER['_curl']);
  19. }
  20. \curl_setopt_array($handle, $options);
  21. }
  22. }