diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-14 02:17:27 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-02 12:53:31 +0100 |
commit | c9d7e88cc70b6ad124c28be479a6e64c4b174ea6 (patch) | |
tree | ee4a37c27b05c1ef4ccc6a01cc088b510f5084ef /tests/Unit/Http | |
parent | 55beca95cd8d6ecfe610daea304c8374a10485af (diff) |
Implemented controller permissions
Diffstat (limited to 'tests/Unit/Http')
-rw-r--r-- | tests/Unit/Http/Exceptions/HttpForbiddenTest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Unit/Http/Exceptions/HttpForbiddenTest.php b/tests/Unit/Http/Exceptions/HttpForbiddenTest.php new file mode 100644 index 00000000..765a20d2 --- /dev/null +++ b/tests/Unit/Http/Exceptions/HttpForbiddenTest.php @@ -0,0 +1,22 @@ +<?php + +namespace Engelsystem\Test\Unit\Http\Exceptions; + +use Engelsystem\Http\Exceptions\HttpForbidden; +use PHPUnit\Framework\TestCase; + +class HttpForbiddenTest extends TestCase +{ + /** + * @covers \Engelsystem\Http\Exceptions\HttpForbidden::__construct + */ + public function testConstruct() + { + $exception = new HttpForbidden(); + $this->assertEquals(403, $exception->getStatusCode()); + $this->assertEquals('', $exception->getMessage()); + + $exception = new HttpForbidden('Go away!'); + $this->assertEquals('Go away!', $exception->getMessage()); + } +} |