/** * @When I sign in to PayPal and pay successfully */ public function iSignInToPaypalAndPaySuccessfully() { $this->paypalApiMocker->mockApiSuccessfulPaymentResponse(); $this->paypalExpressCheckoutPage->pay(); }
function it_logs_in_and_pay_on_paypal_page(PaypalExpressCheckoutPageInterface $paypalExpressCheckoutPage, PaypalApiMocker $paypalApiMocker) { $paypalApiMocker->mockApiSuccessfulPaymentResponse()->shouldBeCalled(); $paypalExpressCheckoutPage->pay()->shouldBeCalled(); $this->iSignInToPaypalAndPaySuccessfully(); }