guzzlehttp/test-server 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 11
  • Watchers: 3
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-06