From 1b3e3b1d65126da909d0013c9c0a0cb3f41639c1 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 7 Oct 2019 22:02:28 +0200 Subject: [PATCH] Exceptions: Added HttpNotFound exception --- src/Http/Exceptions/HttpNotFound.php | 23 +++++++++++++++++++ .../Unit/Http/Exceptions/HttpNotFoundTest.php | 22 ++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/Http/Exceptions/HttpNotFound.php create mode 100644 tests/Unit/Http/Exceptions/HttpNotFoundTest.php diff --git a/src/Http/Exceptions/HttpNotFound.php b/src/Http/Exceptions/HttpNotFound.php new file mode 100644 index 00000000..324adaf9 --- /dev/null +++ b/src/Http/Exceptions/HttpNotFound.php @@ -0,0 +1,23 @@ +assertEquals(404, $exception->getStatusCode()); + $this->assertEquals('', $exception->getMessage()); + + $exception = new HttpNotFound('Nothing to see here!'); + $this->assertEquals('Nothing to see here!', $exception->getMessage()); + } +}