| 1 | <?php namespace Phprest\Exception; |
||
| 5 | class BadRequestTest extends TestCase |
||
| 6 | { |
||
| 7 | public function testInstantiation(): void |
||
| 8 | { |
||
| 9 | $exception = new BadRequest(9, [1,2,3]); |
||
| 10 | |||
| 11 | $this->assertEquals('Bad Request', $exception->getMessage()); |
||
| 12 | $this->assertEquals(400, $exception->getStatusCode()); |
||
| 13 | $this->assertEquals(9, $exception->getCode()); |
||
| 14 | $this->assertEquals([1,2,3], $exception->getDetails()); |
||
| 15 | } |
||
| 16 | } |
||
| 17 |