Skip to content

Instantly share code, notes, and snippets.

@sokil
Created May 17, 2014 14:04
Show Gist options
  • Save sokil/6bce7b58bad27485cb27 to your computer and use it in GitHub Desktop.
Save sokil/6bce7b58bad27485cb27 to your computer and use it in GitHub Desktop.
<?php
$request = $guzzleClient->get('/');
$request->addSubscriber(new \Guzzle\Plugin\Mock\MockPlugin(array(
new \Guzzle\Http\Message\Response(200, null, json_encode(array(
'error' => 0,
)))
)));
$response = $request->send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment