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