for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Postpay\Tests;
use PHPUnit\Framework\TestCase;
use Postpay\Http\Request;
use Postpay\Http\Response;
use Postpay\HttpClients\ClientInterface;
use Postpay\Postpay;
class PostpayTest extends TestCase
{
protected $config = [
'merchant_id' => 'id',
'secret_key' => 'sk',
];
protected function mockClient()
$client = $this->createMock(ClientInterface::class);
$client->method('send')->willReturnCallback(
function (Request $request) {
return new Response($request);
}
);
$config = array_merge($this->config, ['client' => $client]);
return new Postpay($config);