承接 myparcelcom/guzzle-mock 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

myparcelcom/guzzle-mock

Composer 安装命令:

composer require myparcelcom/guzzle-mock

包简介

Test utilities for working with guzzle mock handler in tests

README 文档

README

Test utilities for working with guzzle mock handler in tests

Installation

composer require --dev myparcelcom/guzzle-mock

PHP 7/8

The minimum PHP version is 7.4. To update dependencies on a system without PHP 7 or 8 use:

docker run --rm --mount type=bind,source="$(pwd)",target=/app composer:2 composer update --ignore-platform-reqs

Usage

use MyParcelCom\GuzzleMock\GuzzleMock;
use PHPUnit\Framework\TestCase;

class MyTest extends TestCase
{
    use GuzzleMock;
    
    public function testSomething()
    {
        $response1 = new Response();
        $response2 = new Response();
        
        $requests = [];
        $client = $this->mockGuzzle($requests, $response1, $response2);
        
        // Make requests using the $client
        
        $request1 = $requests[0]['request']; // instanceof GuzzleHttp\Psr7\Request
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-04-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固