toBeInstanceOf(OrderReference::class); expect((string) $vo)->toBe($uuidV7->toString()); expect($vo->value)->toBe($uuidV7); }); it('throws exception if provided UUID is not v7', function () { // GIVEN $uuidV4 = Uuid::uuid4(); // WHEN $action = fn () => getNewOrderReference($uuidV4); // THEN expect($action)->toThrow(\DomainException::class, 'value must be a valid UUID v7'); }); });