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
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-04-16