2026-10-01 10:50:32 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-11-10 14:28:00 +01:00
|
|
|
use App\Cqs\Actions\Orders\FinalizeOrderInput;
|
2026-10-01 10:50:32 +02:00
|
|
|
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);
|
|
|
|
|
});
|
|
|
|
|
});
|