Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function testSend() |
||
19 | { |
||
20 | $mock = new MockHandler([ |
||
21 | new GuzzleResponse(200), |
||
22 | new RequestException('error', new GuzzleRequest('GET', '')) |
||
23 | ]); |
||
24 | $guzzleClient = new Client(['handler' => HandlerStack::create($mock)]); |
||
25 | $client = new GuzzleClient($guzzleClient); |
||
26 | $request = new Request('GET'); |
||
27 | |||
28 | $response = $client->send($request); |
||
29 | self::assertSame(200, $response->getStatusCode()); |
||
30 | |||
31 | $this->expectException(PostpayException::class); |
||
32 | $client->send($request); |
||
33 | } |
||
34 | } |
||
35 |