| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testGetErrorCode() |
||
| 13 | { |
||
| 14 | $request = new Request('GET'); |
||
| 15 | $body = json_encode([ |
||
| 16 | RESTfulException::ERROR_KEY => [ |
||
| 17 | 'code' => 'test' |
||
| 18 | ], |
||
| 19 | ]); |
||
| 20 | $response = new Response($request, 400, [], $body); |
||
| 21 | $exc = new RESTfulException($response); |
||
| 22 | |||
| 23 | self::assertEquals('test', $exc->getErrorCode()); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |