function it_throws_an_exception_if_payment_still_exist(PaymentRepositoryInterface $paymentRepository, PaymentMethodInterface $paypalPaymentMethod, PaymentInterface $payment) { $paymentRepository->findBy(['method' => $paypalPaymentMethod])->willReturn([$payment]); $this->shouldThrow(NotEqualException::class)->during('paymentShouldNotExistInTheRegistry', [$paypalPaymentMethod]); }
/** * @Then /^there should be no ("[^"]+" payments) in the registry$/ */ public function paymentShouldNotExistInTheRegistry(PaymentMethodInterface $paymentMethod) { $payments = $this->paymentRepository->findBy(['method' => $paymentMethod]); Assert::same($payments, []); }
/** * @Then /^there should be no ("[^"]+" payments) in the registry$/ */ public function paymentShouldNotExistInTheRegistry(PaymentMethodInterface $paymentMethod) { $payments = $this->paymentRepository->findBy(['method' => $paymentMethod]); expect($payments)->toBe([]); }