assertEquals(123, $exception->getStatusCode()); $this->assertEquals('', $exception->getMessage()); $this->assertEquals([], $exception->getHeaders()); $exception = new HttpException(404, 'Nothing found', ['page' => '/test']); $this->assertEquals('Nothing found', $exception->getMessage()); $this->assertEquals(['page' => '/test'], $exception->getHeaders()); } }