1 | <?php |
||
13 | final class PaymentContext 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 | * @Then I should be on the checkout payment step |
||
70 | */ |
||
71 | public function iShouldBeOnTheCheckoutPaymentStep() |
||
78 | |||
79 | /** |
||
80 | * @When I go back to payment step of the checkout |
||
81 | */ |
||
82 | public function iAmAtTheCheckoutPaymentStep() |
||
86 | |||
87 | /** |
||
88 | * @When I complete the payment step |
||
89 | */ |
||
90 | public function iCompleteThePaymentStep() |
||
94 | |||
95 | /** |
||
96 | * @When I select :name payment method |
||
97 | */ |
||
98 | public function iSelectPaymentMethod($name) |
||
102 | |||
103 | /** |
||
104 | * @Then I should not be able to select :paymentMethodName payment method |
||
105 | */ |
||
106 | public function iShouldNotBeAbleToSelectPaymentMethod($paymentMethodName) |
||
113 | |||
114 | /** |
||
115 | * @Then I should be able to select :paymentMethodName payment method |
||
116 | */ |
||
117 | public function iShouldBeAbleToSelectPaymentMethod($paymentMethodName) |
||
124 | |||
125 | /** |
||
126 | * @Then I should be redirected to the payment step |
||
127 | */ |
||
128 | public function iShouldBeRedirectedToThePaymentStep() |
||
135 | |||
136 | /** |
||
137 | * @Given I should be able to go to the summary page again |
||
138 | */ |
||
139 | public function iShouldBeAbleToGoToTheSummaryPageAgain() |
||
148 | |||
149 | /** |
||
150 | * @Then I should have :paymentMethodName payment method available as the first choice |
||
151 | */ |
||
152 | public function iShouldHavePaymentMethodAvailableAsFirstChoice($paymentMethodName) |
||
159 | |||
160 | /** |
||
161 | * @Then I should have :paymentMethodName payment method available as the last choice |
||
162 | */ |
||
163 | public function iShouldHavePaymentMethodAvailableAsLastChoice($paymentMethodName) |
||
170 | } |
||
171 |