承接 swisnl/guzzle-fixture-handler 相关项目开发

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

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

swisnl/guzzle-fixture-handler

最新稳定版本:3.0.0

Composer 安装命令:

composer require --dev swisnl/guzzle-fixture-handler

包简介

Fixture handler for Guzzle 6+

README 文档

README

PHP from Packagist Latest Version on Packagist Software License Buy us a tree Build Status Scrutinizer Coverage Scrutinizer Code Quality Made by SWIS

This is a fixture handler for Guzzle 6+ and is meant for testing purposes. It is a temporary wrapper around swisnl/php-http-fixture-client for packages that do not support PSR-18: HTTP Client yet, but require Guzzle 6+ explicitly.

Install

$ composer require --dev swisnl/guzzle-fixture-handler

Usage

// Create client with handler
$responseBuilder = new \Swis\Guzzle\Fixture\ResponseBuilder('/path/to/fixtures');
$handler = new \Swis\Guzzle\Fixture\Handler($responseBuilder);
$handlerStack = \GuzzleHttp\HandlerStack::create($handler);
$client = new \GuzzleHttp\Client(['handler' => $handlerStack]);

// Send request
$response = $client->send(new Request(...));

Fixture mapping

As this is only a wrapper, please see the documentation of swisnl/php-http-fixture-client for more information about using the fixtures.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email security@swis.nl instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

SWIS ❤️ Open Source

SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-09