/**
  * @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);
     }
 }
예제 #2
0
 /**
  * @When /^I delete (promotion "([^"]+)")$/
  */
 public function iDeletePromotion(PromotionInterface $promotion)
 {
     $this->sharedStorage->set('promotion', $promotion);
     $this->promotionRepository->remove($promotion);
 }