1 | <?php |
||
13 | final class CheckoutPaymentContext implements Context |
||
14 | { |
||
15 | /** |
||
16 | * @var SelectPaymentPageInterface |
||
17 | */ |
||
18 | private $selectPaymentPage; |
||
19 | |||
20 | /** |
||
21 | * @var CompletePageInterface |
||
22 | */ |
||
23 | private $completePage; |
||
24 | |||
25 | /** |
||
26 | * @param SelectPaymentPageInterface $selectPaymentPage |
||
27 | * @param CompletePageInterface $completePage |
||
28 | */ |
||
29 | public function __construct(SelectPaymentPageInterface $selectPaymentPage, CompletePageInterface $completePage) |
||
34 | |||
35 | /** |
||
36 | * @When I try to open checkout payment page |
||
37 | */ |
||
38 | public function iTryToOpenCheckoutPaymentPage() |
||
42 | |||
43 | /** |
||
44 | * @When I decide to change order shipping method |
||
45 | */ |
||
46 | public function iDecideToChangeMyShippingMethod() |
||
50 | |||
51 | /** |
||
52 | * @When /^I choose "([^"]*)" payment method$/ |
||
53 | */ |
||
54 | public function iChoosePaymentMethod($paymentMethodName) |
||
59 | |||
60 | /** |
||
61 | * @When I want to pay for order |
||
62 | */ |
||
63 | public function iWantToPayForOrder() |
||
67 | |||
68 | /** |
||
69 | * @When I go back to payment step of the checkout |
||
70 | */ |
||
71 | public function iAmAtTheCheckoutPaymentStep() |
||
75 | |||
76 | /** |
||
77 | * @When I complete the payment step |
||
78 | */ |
||
79 | public function iCompleteThePaymentStep() |
||
83 | |||
84 | /** |
||
85 | * @When I select :name payment method |
||
86 | */ |
||
87 | public function iSelectPaymentMethod($name) |
||
91 | |||
92 | /** |
||
93 | * @Then I should be on the checkout payment step |
||
94 | */ |
||
95 | public function iShouldBeOnTheCheckoutPaymentStep() |
||
99 | |||
100 | /** |
||
101 | * @Then I should be able to select :paymentMethodName payment method |
||
102 | */ |
||
103 | public function iShouldBeAbleToSelectPaymentMethod($paymentMethodName) |
||
107 | |||
108 | /** |
||
109 | * @Then I should not be able to select :paymentMethodName payment method |
||
110 | */ |
||
111 | public function iShouldNotBeAbleToSelectPaymentMethod($paymentMethodName) |
||
115 | |||
116 | /** |
||
117 | * @Then I should be redirected to the payment step |
||
118 | */ |
||
119 | public function iShouldBeRedirectedToThePaymentStep() |
||
123 | |||
124 | /** |
||
125 | * @Then I should be able to go to the summary page again |
||
126 | */ |
||
127 | public function iShouldBeAbleToGoToTheSummaryPageAgain() |
||
133 | |||
134 | /** |
||
135 | * @Then I should have :paymentMethodName payment method available as the first choice |
||
136 | */ |
||
137 | public function iShouldHavePaymentMethodAvailableAsFirstChoice($paymentMethodName) |
||
144 | |||
145 | /** |
||
146 | * @Then I should have :paymentMethodName payment method available as the last choice |
||
147 | */ |
||
148 | public function iShouldHavePaymentMethodAvailableAsLastChoice($paymentMethodName) |
||
155 | } |
||
156 |