22 lines
569 B
PHP
22 lines
569 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Domain\Events\BasketHasBeenModified;
|
|
use Domain\Models\ValueObjects\Entities\BasketId;
|
|
use Ramsey\Uuid\Uuid;
|
|
use Shared\DDD\Event;
|
|
|
|
describe('BasketHasBeenModified', function (): void {
|
|
it('stores the basket id and implements Event', function (): void {
|
|
// GIVEN
|
|
$basketId = new BasketId(Uuid::uuid7());
|
|
|
|
// WHEN
|
|
$event = new BasketHasBeenModified($basketId);
|
|
|
|
// THEN
|
|
expect($event)->toBeInstanceOf(Event::class)
|
|
->and($event->basketId)->toBe($basketId);
|
|
});
|
|
});
|