0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-12-22 12:18:29 +00:00
kevinpapst_kimai2/tests/Validator/ValidationExceptionTest.php
2024-02-07 23:47:25 +01:00

34 lines
863 B
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Validator;
use App\Validator\ValidationException;
use PHPUnit\Framework\TestCase;
/**
* @covers \App\Validator\ValidationException
*/
class ValidationExceptionTest extends TestCase
{
public function testException(): void
{
$sut = new ValidationException();
self::assertEquals(400, $sut->getCode());
self::assertEquals('Validation failed', $sut->getMessage());
}
public function testConstruct(): void
{
$sut = new ValidationException('Something went wrong');
self::assertEquals(400, $sut->getCode());
self::assertEquals('Something went wrong', $sut->getMessage());
}
}