Payum\Paypal\ProCheckout\Nvp\Tests\ApiTest::createSuccessHttpClientStub PHP Method

createSuccessHttpClientStub() protected method

protected createSuccessHttpClientStub ( ) : PHPUnit_Framework_MockObject_MockObject | Payum\Core\HttpClientInterface
return PHPUnit_Framework_MockObject_MockObject | Payum\Core\HttpClientInterface
    protected function createSuccessHttpClientStub()
    {
        $clientMock = $this->createHttpClientMock();
        $clientMock->expects($this->any())->method('send')->will($this->returnCallback(function (RequestInterface $request) {
            return new Response(200, [], $request->getBody());
        }));
        return $clientMock;
    }