diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-27 13:34:55 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-02 12:53:31 +0100 |
commit | 55beca95cd8d6ecfe610daea304c8374a10485af (patch) | |
tree | e84ca6064c3d3b6315e9c026b0a808f8e594d16a /tests/Unit/Http | |
parent | 9788c5095a67a45fe3545ae0fc747b8e629ea4fd (diff) |
Refactoring: Throw HttpAuthExpired on csrf token mismatch
Diffstat (limited to 'tests/Unit/Http')
-rw-r--r-- | tests/Unit/Http/Exceptions/HttpAuthExpiredTest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Unit/Http/Exceptions/HttpAuthExpiredTest.php b/tests/Unit/Http/Exceptions/HttpAuthExpiredTest.php new file mode 100644 index 00000000..4eaee032 --- /dev/null +++ b/tests/Unit/Http/Exceptions/HttpAuthExpiredTest.php @@ -0,0 +1,22 @@ +<?php + +namespace Engelsystem\Test\Unit\Http\Exceptions; + +use Engelsystem\Http\Exceptions\HttpAuthExpired; +use PHPUnit\Framework\TestCase; + +class HttpAuthExpiredTest extends TestCase +{ + /** + * @covers \Engelsystem\Http\Exceptions\HttpAuthExpired::__construct + */ + public function testConstruct() + { + $exception = new HttpAuthExpired(); + $this->assertEquals(419, $exception->getStatusCode()); + $this->assertEquals('Authentication Expired', $exception->getMessage()); + + $exception = new HttpAuthExpired('Oops!'); + $this->assertEquals('Oops!', $exception->getMessage()); + } +} |