| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 42 | public function testCurlDriverException(): void |
||
| 43 | { |
||
| 44 | include __DIR__ . '/Curl_exec_false_Mock.php'; |
||
| 45 | |||
| 46 | $curlDriver = new CurlDriver(); |
||
| 47 | |||
| 48 | try { |
||
| 49 | $curlDriver->request( |
||
| 50 | HttpMethod::get(HttpMethod::POST), |
||
| 51 | 'foo/url', |
||
| 52 | null, |
||
| 53 | [ |
||
| 54 | 'Content-Type' => 'application/json', |
||
| 55 | ] |
||
| 56 | ); |
||
| 57 | |||
| 58 | } catch (CurlDriverException $e) { |
||
| 59 | self::assertSame(11, $e->getCode()); |
||
| 60 | self::assertSame('foo getinfo', $e->getInfo()); |
||
| 61 | } |
||
| 65 |