From 9788c5095a67a45fe3545ae0fc747b8e629ea4fd Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 13 Nov 2018 17:48:07 +0100 Subject: Implemented HttpException --- tests/Unit/Http/Exceptions/HttpExceptionTest.php | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/Unit/Http/Exceptions/HttpExceptionTest.php (limited to 'tests/Unit/Http/Exceptions') diff --git a/tests/Unit/Http/Exceptions/HttpExceptionTest.php b/tests/Unit/Http/Exceptions/HttpExceptionTest.php new file mode 100644 index 00000000..ce2b064d --- /dev/null +++ b/tests/Unit/Http/Exceptions/HttpExceptionTest.php @@ -0,0 +1,26 @@ +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()); + } +} -- cgit v1.2.3-54-g00ecf