summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/ValidationExceptionTest.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-07-21 13:32:45 +0200
committerGitHub <noreply@github.com>2019-07-21 13:32:45 +0200
commitd4d4b409b6fd96ca297af323936b8922d45b6eda (patch)
tree6c8efa1a1e429f3965820838796cb4b97cd2df11 /tests/Unit/Http/Exceptions/ValidationExceptionTest.php
parentd5bf7fd065a5ea93dea9fd55e6ac225ee062a3db (diff)
parent51a3c6eb44a5dbdf9d7a3cfac678f0d29b0d3eef (diff)
Merge pull request #622 from MyIgel/controllers
AuthController (login, logout), use templating, replaced gettext, input validation
Diffstat (limited to 'tests/Unit/Http/Exceptions/ValidationExceptionTest.php')
-rw-r--r--tests/Unit/Http/Exceptions/ValidationExceptionTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Unit/Http/Exceptions/ValidationExceptionTest.php b/tests/Unit/Http/Exceptions/ValidationExceptionTest.php
new file mode 100644
index 00000000..c5a38b5a
--- /dev/null
+++ b/tests/Unit/Http/Exceptions/ValidationExceptionTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Http\Exceptions;
+
+use Engelsystem\Http\Exceptions\ValidationException;
+use Engelsystem\Http\Validation\Validator;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+
+class ValidationExceptionTest extends TestCase
+{
+ /**
+ * @covers \Engelsystem\Http\Exceptions\ValidationException::__construct
+ * @covers \Engelsystem\Http\Exceptions\ValidationException::getValidator
+ */
+ public function testConstruct()
+ {
+ /** @var Validator|MockObject $validator */
+ $validator = $this->createMock(Validator::class);
+
+ $exception = new ValidationException($validator);
+
+ $this->assertEquals($validator, $exception->getValidator());
+ }
+}