| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 15 | public function testRequest(): void |
||
| 16 | { |
||
| 17 | include __DIR__ . '/CurlMock.php'; |
||
| 18 | |||
| 19 | $curlDriver = new CurlDriver(); |
||
| 20 | |||
| 21 | $response = $curlDriver->request( |
||
| 22 | HttpMethod::get(HttpMethod::POST), |
||
| 23 | 'foo/url', |
||
| 24 | null, |
||
| 25 | [ |
||
| 26 | 'Content-Type' => 'application/json', |
||
| 27 | ] |
||
| 28 | ); |
||
| 29 | |||
| 30 | self::assertSame(ResponseCode::S200_OK, $response->getResponseCode()->getValue()); |
||
| 31 | self::assertEquals([ |
||
| 32 | 'text' => 'foo text', |
||
| 33 | ], $response->getData()); |
||
| 34 | self::assertEquals([ |
||
| 35 | 'abc' => 'def', |
||
| 36 | ], $response->getHeaders()); |
||
| 37 | } |
||
| 65 |