PluginProbe
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more / 2.6.1
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more v2.6.1
3.7.2 3.7.1 3.7.0 3.6.0 3.6.1 3.5.2 trunk 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.6.0 2.6.1 All 73 releases
stockpack / vendor / guzzlehttp / guzzle / tests / bootstrap.php

bootstrap.php in StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more 2.6.1, at vendor/guzzlehttp/guzzle/tests/bootstrap.php

35 lines 953 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace GuzzleHttp\Test {
3 require __DIR__ . '/../vendor/autoload.php';
4 require __DIR__ . '/Server.php';
5 use GuzzleHttp\Tests\Server;
6
7 Server::start();
8 register_shutdown_function(function () {
9 Server::stop();
10 });
11 }
12
13 // Override curl_setopt_array() and curl_multi_setopt() to get the last set curl options
14 namespace GuzzleHttp\Handler {
15 function curl_setopt_array($handle, array $options)
16 {
17 if (!empty($_SERVER['curl_test'])) {
18 $_SERVER['_curl'] = $options;
19 } else {
20 unset($_SERVER['_curl']);
21 }
22 return \curl_setopt_array($handle, $options);
23 }
24
25 function curl_multi_setopt($handle, $option, $value)
26 {
27 if (!empty($_SERVER['curl_test'])) {
28 $_SERVER['_curl_multi'][$option] = $value;
29 } else {
30 unset($_SERVER['_curl_multi']);
31 }
32 return \curl_multi_setopt($handle, $option, $value);
33 }
34 }
35