summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-10-07 22:02:28 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2019-10-07 22:02:28 +0200
commit1b3e3b1d65126da909d0013c9c0a0cb3f41639c1 (patch)
tree9c249a880acfa8c9cbab48989ad33ba7d05f0f30 /tests
parent8d090438b659b641dd0f6cbc99193f3b48b2fc4b (diff)
Exceptions: Added HttpNotFound exception
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Http/Exceptions/HttpNotFoundTest.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Unit/Http/Exceptions/HttpNotFoundTest.php b/tests/Unit/Http/Exceptions/HttpNotFoundTest.php
new file mode 100644
index 00000000..a39ea087
--- /dev/null
+++ b/tests/Unit/Http/Exceptions/HttpNotFoundTest.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Http\Exceptions;
+
+use Engelsystem\Http\Exceptions\HttpNotFound;
+use PHPUnit\Framework\TestCase;
+
+class HttpNotFoundTest extends TestCase
+{
+ /**
+ * @covers \Engelsystem\Http\Exceptions\HttpNotFound::__construct
+ */
+ public function testConstruct()
+ {
+ $exception = new HttpNotFound();
+ $this->assertEquals(404, $exception->getStatusCode());
+ $this->assertEquals('', $exception->getMessage());
+
+ $exception = new HttpNotFound('Nothing to see here!');
+ $this->assertEquals('Nothing to see here!', $exception->getMessage());
+ }
+}