pock

SymfonyClientFactory
in package

FinalYes

Creates a Symfony HTTP client backed by Pock mocks.

Most consumers should call PockBuilder::getSymfonyClient(). Use the factory directly when an already constructed Pock Client must be adapted.

$symfonyClient = (new SymfonyClientFactory())->create($pockClient);
Tags
category

SymfonyClientFactory

Table of Contents

Methods

create()  : HttpClientInterface
Wrap a pock client in Symfony's MockHttpClient transport.

Methods

create()

Wrap a pock client in Symfony's MockHttpClient transport.

public create(Client $client) : HttpClientInterface
$symfonyClient = $factory->create($pockClient);
Parameters
$client : Client

Configured pock client used as the transport.

Return values
HttpClientInterface
On this page

Search results