| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class ClientTest extends TestCase |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @dataProvider provideInvalidHosts |
||
| 19 | */ |
||
| 20 | public function testSendToInvalidUrl($host, $client) |
||
| 21 | { |
||
| 22 | $this->expectException(ClientException::class); |
||
| 23 | |||
| 24 | $request = new Request('GET', 'http://'.$host.':12345'); |
||
| 25 | |||
| 26 | /** @var BuzzClientInterface $client */ |
||
| 27 | $client = new $client(); |
||
| 28 | $client->sendRequest($request, ['timeout' => 0.1]); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function provideInvalidHosts() |
||
| 42 | ]; |
||
| 43 | } |
||
| 45 |