function it_throws_invalid_argument_exception_if_on_hold_quantity_to_decrease_will_be_below_zero(OrderInterface $order, OrderItemInterface $orderItem, ProductVariantInterface $productVariant) { $productVariant->getOnHold()->willReturn(5); $productVariant->isTracked()->willReturn(true); $productVariant->getName()->willReturn('t-shirt'); $orderItem->getVariant()->willReturn($productVariant); $orderItem->getQuantity()->willReturn(10); $order->getItems()->willReturn([$orderItem]); $productVariant->setOnHold(-5)->shouldNotBeCalled(); $this->shouldThrow(\InvalidArgumentException::class)->during('decrease', [$order]); }