ldc-boutique-cnc-sable/tests/Unit/App/Actions/Orders/FinalizeOrderInputTest.php

28 lines
713 B
PHP

<?php
declare(strict_types=1);
use App\Actions\Orders\FinalizeOrderInput;
use Domain\Models\ValueObjects\Entities\ShopperId;
use Ramsey\Uuid\Uuid;
describe('FinalizeOrderInput', function (): void {
it('can be instantiated with null shopperId', function (): void {
// GIVEN & WHEN
$input = new FinalizeOrderInput();
// THEN
expect($input->shopperId)->toBeNull();
});
it('can be instantiated with valid shopperId', function (): void {
// GIVEN
$shopperId = new ShopperId(Uuid::uuid7());
// WHEN
$input = new FinalizeOrderInput(shopperId: $shopperId);
// THEN
expect($input->shopperId)->toBe($shopperId);
});
});