create(); $order = Order::query()->forceCreate([ 'id' => UuidHelper::v7()->toString(), 'shop_id' => $shop->id, 'reference' => new OrderReference(UuidHelper::v7()), 'status' => OrderStatus::VALIDATED->value, 'total' => new Money(2000, new Currency('EUR')), 'employee' => new OrderEmployee( new Matricule('1000101'), 'Jean', 'Dupont', new ShopperEstablishmentCode('01'), new ShopperSiteCode('SITE'), new ShopperServiceCode('01'), ), 'delivery_address' => new DeliveryAddress('Shop', '1 rue Test', '75000', 'Paris'), 'pickup_day' => '2026-11-20', ]); $action = new ClaimTodayOrderReminder(); $remindedAt = CarbonImmutable::parse('2026-11-20 10:00:00'); $input = new ClaimTodayOrderReminderInput($order->getId(), $remindedAt); // WHEN $firstClaim = $action($input); $secondClaim = $action($input); // THEN expect($firstClaim)->toBeTrue() ->and($secondClaim)->toBeFalse() ->and($order->fresh()?->reminded_at)->not->toBeNull(); }); });