diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-07-09 21:43:18 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-07-09 21:43:18 +0200 |
commit | 7414f9b23dbcc66e5f0efda3d0cbfd79372ec780 (patch) | |
tree | 891a11b71d8b25922fc4b343dbc77a01a0646ba1 /tests/Unit/Http/Exceptions | |
parent | 508695efb253d7bc0caea1fa017ed5608d774596 (diff) |
Implemented Validation for controllers
Diffstat (limited to 'tests/Unit/Http/Exceptions')
-rw-r--r-- | tests/Unit/Http/Exceptions/ValidationExceptionTest.php | 25 |
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()); + } +} |