/** * @Given /^the (coupon "[^"]+") was used up to its usage limit$/ */ public function theCouponWasUsed(PromotionCouponInterface $coupon) { $coupon->setUsed($coupon->getUsageLimit()); $this->objectManager->flush(); }