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

23 lines
564 B
PHP

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