1 | <?php |
||
29 | final class ChannelContext implements Context |
||
30 | { |
||
31 | /** |
||
32 | * @var SharedStorageInterface |
||
33 | */ |
||
34 | private $sharedStorage; |
||
35 | |||
36 | /** |
||
37 | * @var DefaultChannelFactoryInterface |
||
38 | */ |
||
39 | private $unitedStatesChannelFactory; |
||
40 | |||
41 | /** |
||
42 | * @var DefaultChannelFactoryInterface |
||
43 | */ |
||
44 | private $defaultChannelFactory; |
||
45 | |||
46 | /** |
||
47 | * @var ChannelRepositoryInterface |
||
48 | */ |
||
49 | private $channelRepository; |
||
50 | |||
51 | /** |
||
52 | * @var ObjectManager |
||
53 | */ |
||
54 | private $channelManager; |
||
55 | |||
56 | /** |
||
57 | * @param SharedStorageInterface $sharedStorage |
||
58 | * @param DefaultChannelFactoryInterface $unitedStatesChannelFactory |
||
59 | * @param DefaultChannelFactoryInterface $defaultChannelFactory |
||
60 | * @param ChannelRepositoryInterface $channelRepository |
||
61 | * @param ObjectManager $channelManager |
||
62 | */ |
||
63 | public function __construct( |
||
76 | |||
77 | /** |
||
78 | * @Given :channel channel has account verification disabled |
||
79 | */ |
||
80 | public function channelHasAccountVerificationDisabled(ChannelInterface $channel): void |
||
86 | |||
87 | /** |
||
88 | * @Given the store operates on a single channel in "United States" |
||
89 | */ |
||
90 | public function storeOperatesOnASingleChannelInUnitedStates() |
||
97 | |||
98 | /** |
||
99 | * @Given the store operates on a single channel in the "United States" named :channelIdentifier |
||
100 | */ |
||
101 | public function storeOperatesOnASingleChannelInTheUnitedStatesNamed($channelIdentifier) |
||
108 | |||
109 | /** |
||
110 | * @Given the store operates on a single channel |
||
111 | * @Given the store operates on a single channel in :currencyCode currency |
||
112 | */ |
||
113 | public function storeOperatesOnASingleChannel($currencyCode = null) |
||
120 | |||
121 | /** |
||
122 | * @Given /^the store(?:| also) operates on (?:a|another) channel named "([^"]+)"$/ |
||
123 | * @Given /^the store(?:| also) operates on (?:a|another) channel named "([^"]+)" in "([^"]+)" currency$/ |
||
124 | * @Given the store operates on a channel identified by :code code |
||
125 | */ |
||
126 | public function theStoreOperatesOnAChannelNamed($channelName, $currencyCode = null) |
||
134 | |||
135 | /** |
||
136 | * @Given the channel :channel is enabled |
||
137 | */ |
||
138 | public function theChannelIsEnabled(ChannelInterface $channel) |
||
142 | |||
143 | /** |
||
144 | * @Given the channel :channel is disabled |
||
145 | * @Given the channel :channel has been disabled |
||
146 | */ |
||
147 | public function theChannelIsDisabled(ChannelInterface $channel) |
||
151 | |||
152 | /** |
||
153 | * @Given channel :channel has been deleted |
||
154 | */ |
||
155 | public function iChannelHasBeenDeleted(ChannelInterface $channel) |
||
159 | |||
160 | /** |
||
161 | * @Given /^(its) default tax zone is (zone "([^"]+)")$/ |
||
162 | */ |
||
163 | public function itsDefaultTaxRateIs(ChannelInterface $channel, ZoneInterface $defaultTaxZone) |
||
168 | |||
169 | /** |
||
170 | * @Given /^(this channel) has contact email set as "([^"]+)"$/ |
||
171 | * @Given /^(this channel) has no contact email set$/ |
||
172 | */ |
||
173 | public function thisChannelHasContactEmailSetAs(ChannelInterface $channel, $contactEmail = null) |
||
178 | |||
179 | /** |
||
180 | * @Given /^on (this channel) shipping step is skipped if only a single shipping method is available$/ |
||
181 | */ |
||
182 | public function onThisChannelShippingStepIsSkippedIfOnlyASingleShippingMethodIsAvailable(ChannelInterface $channel) |
||
188 | |||
189 | /** |
||
190 | * @Given /^on (this channel) payment step is skipped if only a single payment method is available$/ |
||
191 | */ |
||
192 | public function onThisChannelPaymentStepIsSkippedIfOnlyASinglePaymentMethodIsAvailable( |
||
199 | |||
200 | /** |
||
201 | * @Given /^on (this channel) account verification is not required$/ |
||
202 | */ |
||
203 | public function onThisChannelAccountVerificationIsNotRequired(ChannelInterface $channel) |
||
209 | |||
210 | /** |
||
211 | * @param ChannelInterface $channel |
||
212 | * @param bool $state |
||
213 | */ |
||
214 | private function changeChannelState(ChannelInterface $channel, $state) |
||
220 | } |
||
221 |