Test Failed
Push — master ( 6bff04...e0da10 )
by Lyal
02:14
created

UnitTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 13
c 0
b 0
f 0
rs 10
1
<?php
2
namespace Tests;
3
4
use GuzzleHttp\Client as GuzzleClient;
5
use GuzzleHttp\Handler\MockHandler;
6
use GuzzleHttp\HandlerStack;
7
use Lyal\Checkr\Client;
8
9
10
class UnitTestCase extends TestCase
11
{
12
13
    public function mockGuzzle(array $responses)
14
    {
15
        $mock = new MockHandler($responses);
16
        $handler = HandlerStack::create($mock);
17
        return new GuzzleClient(['handler' => $handler]);
18
    }
19
20
    public function getClient($responses = [])
21
    {
22
        return new Client('ourverysecretkey', [], $this->mockGuzzle($responses));
23
    }
24
25
}