Skip to content

Commit

Permalink
Merge pull request #231 from citricsquid/patch-1
Browse files Browse the repository at this point in the history
Replaces deprecated getMock with createMock in mock client documentation
  • Loading branch information
dbu committed Apr 8, 2018
2 parents 2d6cab3 + a058c13 commit 3b98e1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clients/mock-client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ certain responses::
{
$client = new Client();

$response = $this->getMock('Psr\Http\Message\ResponseInterface');
$response = $this->createMock('Psr\Http\Message\ResponseInterface');
$client->addResponse($response);

// $request is an instance of Psr\Http\Message\RequestInterface
Expand All @@ -81,7 +81,7 @@ Or set a default response::
{
$client = new Client();

$response = $this->getMock('Psr\Http\Message\ResponseInterface');
$response = $this->createMock('Psr\Http\Message\ResponseInterface');
$client->setDefaultResponse($response);

// $firstRequest and $secondRequest are instances of Psr\Http\Message\RequestInterface
Expand Down Expand Up @@ -129,7 +129,7 @@ Or set a default exception::
$exception = new \Exception('Whoops!');
$client->setDefaultException($exception);

$response = $this->getMock('Psr\Http\Message\ResponseInterface');
$response = $this->createMock('Psr\Http\Message\ResponseInterface');
$client->addResponse($response);

// $firstRequest and $secondRequest are instances of Psr\Http\Message\RequestInterface
Expand Down

0 comments on commit 3b98e1e

Please sign in to comment.