Completed
Push — master ( 2ffc89...421969 )
by Dani
01:02
created

PostpayTest::testDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Postpay\Tests;
4
5
use PHPUnit\Framework\TestCase;
6
use Postpay\Http\Request;
7
use Postpay\Http\Response;
8
use Postpay\HttpClients\ClientInterface;
9
use Postpay\Postpay;
10
11
class PostpayTest extends TestCase
12
{
13
    protected $config = [
14
        'merchant_id' => 'id',
15
        'secret_key' => 'sk',
16
    ];
17
18
    protected function mockClient()
19
    {
20
        $client = $this->createMock(ClientInterface::class);
21
22
        $client->method('send')->willReturnCallback(
23
            function (Request $request) {
24
                return new Response($request);
25
            }
26
        );
27
        $config = array_merge($this->config, ['client' => $client]);
28
        return new Postpay($config);
29
    }
30
}
31