1 | <?php |
||
26 | final class CheckoutContext implements Context |
||
27 | { |
||
28 | /** |
||
29 | * @var SharedStorageInterface |
||
30 | */ |
||
31 | private $sharedStorage; |
||
32 | |||
33 | /** |
||
34 | * @var CheckoutAddressingStep |
||
35 | */ |
||
36 | private $checkoutAddressingStep; |
||
37 | |||
38 | /** |
||
39 | * @var CheckoutShippingStep |
||
40 | */ |
||
41 | private $checkoutShippingStep; |
||
42 | |||
43 | /** |
||
44 | * @var CheckoutPaymentStep |
||
45 | */ |
||
46 | private $checkoutPaymentStep; |
||
47 | |||
48 | /** |
||
49 | * @var CheckoutFinalizeStep |
||
50 | */ |
||
51 | private $checkoutFinalizeStep; |
||
52 | |||
53 | /** |
||
54 | * @var CheckoutThankYouPage |
||
55 | */ |
||
56 | private $checkoutThankYouPage; |
||
57 | |||
58 | /** |
||
59 | * @param SharedStorageInterface $sharedStorage |
||
60 | * @param CheckoutAddressingStep $checkoutAddressingStep |
||
61 | * @param CheckoutShippingStep $checkoutShippingStep |
||
62 | * @param CheckoutPaymentStep $checkoutPaymentStep |
||
63 | * @param CheckoutFinalizeStep $checkoutFinalizeStep |
||
64 | * @param CheckoutThankYouPage $checkoutThankYouPage |
||
65 | */ |
||
66 | public function __construct( |
||
81 | |||
82 | /** |
||
83 | * @When I proceed selecting :paymentMethodName payment method |
||
84 | */ |
||
85 | public function iProceedSelectingOfflinePaymentMethod($paymentMethodName) |
||
89 | |||
90 | /** |
||
91 | * @When /^I proceed selecting "([^"]+)" shipping method$/ |
||
92 | * @Given /^I chose "([^"]*)" shipping method$/ |
||
93 | */ |
||
94 | public function iProceedSelectingShippingMethod($shippingMethodName) |
||
98 | |||
99 | /** |
||
100 | * @When /^I proceed selecting "([^"]*)" as shipping country with "([^"]*)" method$/ |
||
101 | */ |
||
102 | public function iProceedSelectingShippingCountryAndShippingMethod($shippingCountry, $shippingMethodName) |
||
106 | |||
107 | /** |
||
108 | * @When /^I change shipping method to "([^"]*)"$/ |
||
109 | */ |
||
110 | public function iChangeShippingMethod($shippingMethodName) |
||
116 | |||
117 | /** |
||
118 | * @When I confirm my order |
||
119 | */ |
||
120 | public function iConfirmMyOrder() |
||
124 | |||
125 | /** |
||
126 | * @Then I should see the thank you page |
||
127 | */ |
||
128 | public function iShouldSeeTheThankYouPage() |
||
136 | |||
137 | /** |
||
138 | * @param string|null $shippingCountry |
||
139 | * @param string|null $shippingMethodName |
||
140 | * @param string|null $paymentMethodName |
||
141 | */ |
||
142 | private function proceedOrder($shippingCountry = null, $shippingMethodName = null, $paymentMethodName = null) |
||
162 | } |
||
163 |