23 lines
564 B
PHP
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);
|
|
});
|
|
});
|