/** * @Then /^(this coupon) should no longer exist in the coupon registry$/ */ public function couponShouldNotExistInTheRegistry(PromotionCouponInterface $coupon) { Assert::null($this->couponRepository->findOneBy(['code' => $coupon->getCode()]), sprintf('The coupon with code %s should not exist', $coupon->getCode())); }