guzzlehttp/test-server
最新稳定版本:0.1.0
Composer 安装命令:
composer require guzzlehttp/test-server
包简介
Node.js server and PHP controller
README 文档
README
This server has long been part of the Guzzle Http client. Since late 2021 it was extracted to its own package.
The server is useful to use in your integration tests.
use GuzzleHttp\Server\Server; Server::start(); register_shutdown_function(static function () { Server::stop(); }); Server::enqueue([ new Response(201), ]); $myHttpClient = MyClient(); $response = $this->makeRequest('GET', Server::$url); // $response will be 201 $requests = Server::received(); // $request[0] is the one sent by MyClient
统计信息
- 总下载量: 172.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-06