/**
  * @Then /^([^"]+) should still exist in the registry$/
  */
 public function couponShouldStillExistInTheRegistry(CouponInterface $coupon)
 {
     Assert::notNull($this->couponRepository->find($coupon->getId()), sprintf('The coupon with id %s should exist', $coupon->getId()));
 }
 function it_throws_exception_when_a_coupon_is_not_found_but_it_should_exist(RepositoryInterface $couponRepository, CouponInterface $coupon)
 {
     $coupon->getId()->willReturn(5);
     $couponRepository->find(5)->willReturn(null);
     $this->shouldThrow(FailureException::class)->during('couponShouldStillExistInTheRegistry', [$coupon]);
 }
Beispiel #3
0
 /**
  * @Then /^([^"]+) should still exist in the registry$/
  */
 public function couponShouldStillExistInTheRegistry(CouponInterface $coupon)
 {
     expect($this->couponRepository->find($coupon->getId()))->toNotBe(null);
 }