engelsystem/tests/Unit/Http/Exceptions/ValidationExceptionTest.php

28 lines
772 B
PHP
Raw Permalink Normal View History

2019-07-09 21:43:18 +02:00
<?php
declare(strict_types=1);
2019-07-09 21:43:18 +02:00
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(): void
2019-07-09 21:43:18 +02:00
{
/** @var Validator|MockObject $validator */
$validator = $this->createMock(Validator::class);
$exception = new ValidationException($validator);
$this->assertEquals($validator, $exception->getValidator());
}
}