summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/ValidationExceptionTest.php
blob: c5a38b5a9bfab0aeee5241b9a857ac16a02c0b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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());
    }
}