/** * @Given /^I tried to pay(?:| again)$/ * @When /^I try to pay(?:| again)$/ */ public function iTryToPayAgain() { $this->paypalApiMocker->mockApiPaymentInitializeResponse(); $this->orderDetails->pay(); }
/** * @Then I should not be able to pay */ public function iShouldNotBeAbleToPayAgain() { Assert::false($this->orderDetails->hasPayAction(), 'I should not be able to pay, but I am able to.'); }
/** * @Given /^I tried to pay(?:| again)$/ * @When /^I try to pay(?:| again)$/ */ public function iTryToPayAgain() { $this->paypalApiMocker->performActionInApiInitializeScope(function () { $this->orderDetails->pay(); }); }