summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php')
-rw-r--r--tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php b/tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php
new file mode 100644
index 00000000..3f6a832c
--- /dev/null
+++ b/tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Http;
+
+use Engelsystem\Http\Exceptions\HttpPermanentRedirect;
+use Engelsystem\Http\Exceptions\HttpRedirect;
+use PHPUnit\Framework\TestCase;
+
+class HttpPermanentRedirectTest extends TestCase
+{
+ /**
+ * @covers \Engelsystem\Http\Exceptions\HttpPermanentRedirect::__construct
+ */
+ public function testConstruct()
+ {
+ $exception = new HttpPermanentRedirect('https://lorem.ipsum/foo/bar');
+ $this->assertInstanceOf(HttpRedirect::class, $exception);
+ $this->assertEquals(301, $exception->getStatusCode());
+ }
+}