2017 © Pedro Peláez
 

library http-mock-guzzle

Integrates jfalque/http-mock into Guzzle

image

jfalque/http-mock-guzzle

Integrates jfalque/http-mock into Guzzle

  • Thursday, March 2, 2017
  • by julienfalque
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 42 % Grown

The README.md

HttpMock Guzzle Integration

Build status Latest Stable Version License, (*1)

This package is archived and not maintained anymore., (*2)

Provides a Guzzle handler that integrates HttpMock., (*3)

Installation

Run the following Composer command:, (*4)

$ composer require --dev jfalque/http-mock-guzzle, (*5)

Usage

The easiest way to use the HttpMock handler is to create a default stack with the dedicated HttpMockHandler::createStack() method:, (*6)

use GuzzleHttp\Client;
use Jfalque\HttpMock\Guzzle\HttpMockHandler;
use Jfalque\HttpMock\Server;

$server = new Server();

$client = new Client([
    'handler' => HttpMockHandler::createStack($server),
]);

The handler can be created manually and used with an existing stack:, (*7)

$server = new Server();
$handler = new HttpMockHandler($server);
$stack->setHandler($handler);

Or injected in a client without using a stack:, (*8)

$server = new Server();
$client = new Client([
    'handler' => new HttpMockHandler($server),
]);

The Versions

02/03 2017

dev-master

9999999-dev

Integrates jfalque/http-mock into Guzzle

  Sources   Download

MIT

The Requires

 

The Development Requires

test mock http guzzle

05/02 2017

v1.0.0

1.0.0.0

Integrates jfalque/http-mock into Guzzle

  Sources   Download

MIT

The Requires

 

The Development Requires

test mock http guzzle