コード例 #1
0
 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]);
 }
コード例 #2
0
ファイル: PaymentContext.php プロジェクト: TeamNovatek/Sylius
 /**
  * @Then /^there should be no ("[^"]+" payments) in the registry$/
  */
 public function paymentShouldNotExistInTheRegistry(PaymentMethodInterface $paymentMethod)
 {
     $payments = $this->paymentRepository->findBy(['method' => $paymentMethod]);
     Assert::same($payments, []);
 }
コード例 #3
0
ファイル: PaymentContext.php プロジェクト: ahmadrabie/Sylius
 /**
  * @Then /^there should be no ("[^"]+" payments) in the registry$/
  */
 public function paymentShouldNotExistInTheRegistry(PaymentMethodInterface $paymentMethod)
 {
     $payments = $this->paymentRepository->findBy(['method' => $paymentMethod]);
     expect($payments)->toBe([]);
 }