ldc-mesbr-app/tests/Unit/Shared/Exceptions/InvalidUuidExceptionTest.php
2026-09-15 09:24:18 +02:00

24 lines
591 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Shared\Exceptions;
use Shared\Exceptions\InvalidUuidException;
use InvalidArgumentException;
covers(InvalidUuidException::class);
describe('uuid invalid exception', function (): void {
it('get the correct message', function (): void {
// GIVEN
$uuid = '';
// WHEN
$exception = InvalidUuidException::forValue($uuid);
// THEN
expect($exception->getMessage())->toBe("Invalid UUID: {$uuid}")
->and($exception)->toBeInstanceOf(InvalidArgumentException::class);
});
});