/** * @When /^I delete a ("([^"]+)" promotion)$/ * @When /^I try to delete a ("([^"]+)" promotion)$/ */ public function iTryToDeletePromotion(PromotionInterface $promotion) { try { $this->promotionRepository->remove($promotion); } catch (ForeignKeyConstraintViolationException $exception) { $this->sharedStorage->set('last_exception', $exception); } }
/** * @When /^I delete (promotion "([^"]+)")$/ */ public function iDeletePromotion(PromotionInterface $promotion) { $this->sharedStorage->set('promotion', $promotion); $this->promotionRepository->remove($promotion); }