| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function testSleeperHttpException() { |
||
| 23 | $response = new GuzzleHttp\Psr7\Response(429, [], null); |
||
| 24 | $mock = new GuzzleHttp\Handler\MockHandler([ $response, $response ]); |
||
| 25 | |||
| 26 | $client = new Sleeper($mock); |
||
| 27 | |||
| 28 | $this->expectException(ClientException::class); |
||
| 29 | $this->expectExceptionMessage('Client error: `GET league/289646328504385536` resulted in a `429 Too Many Requests` response'); |
||
| 30 | |||
| 31 | $league = $client->leagues()->find('289646328504385536'); |
||
| 32 | } |
||
| 35 |