airtimerewards/guzzle-test-helper 问题修复 & 功能扩展

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

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

airtimerewards/guzzle-test-helper

最新稳定版本:v1.3.0

Composer 安装命令:

composer require airtimerewards/guzzle-test-helper

包简介

Helper for testing guzzle requests.

README 文档

README

This library is used to help test requests and responses made by guzzle. Instantiate an instance of AirtimeRewards\GuzzleTestHelper\MockGuzzleClient with the same parameters you would instantiate the standard guzzle client, then responses can be injected and requests can be retrieved for assertions.

Example

<?php use AirtimeRewards\GuzzleTestHelper\MockGuzzleClient; $client = new MockGuzzleClient(); $client->append(200, ['Content-Type' => 'text/plain'], 'Hello World!'); $client->append(204); $response = $client->get('/foo'); echo $response->getBody(); // "Hello World!" echo $response->getStatusCode(); // 200 $response2 = $client->post('/bar'); echo $response2->getStatusCode(); // 204 $request1 = $client->getRequest(0); echo $request1->getUri(); // "/foo" echo $request1->getMethod(); // "GET" $request2 = $client->getLastRequest(); echo $request2->getUri(); // "/bar" echo $request2->getMethod(); // "POST"

统计信息

  • 总下载量: 18.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固