1 | <?php |
||
28 | final class ChannelContext implements Context |
||
29 | { |
||
30 | /** @var SharedStorageInterface */ |
||
31 | private $sharedStorage; |
||
32 | |||
33 | /** @var DefaultChannelFactoryInterface */ |
||
34 | private $unitedStatesChannelFactory; |
||
35 | |||
36 | /** @var DefaultChannelFactoryInterface */ |
||
37 | private $defaultChannelFactory; |
||
38 | |||
39 | /** @var ChannelRepositoryInterface */ |
||
40 | private $channelRepository; |
||
41 | |||
42 | /** @var ObjectManager */ |
||
43 | private $channelManager; |
||
44 | |||
45 | public function __construct( |
||
58 | |||
59 | /** |
||
60 | * @Given :channel channel has account verification disabled |
||
61 | */ |
||
62 | public function channelHasAccountVerificationDisabled(ChannelInterface $channel): void |
||
68 | |||
69 | /** |
||
70 | * @Given the store operates on a single channel in "United States" |
||
71 | */ |
||
72 | public function storeOperatesOnASingleChannelInUnitedStates() |
||
79 | |||
80 | /** |
||
81 | * @Given the store operates on a single channel in the "United States" named :channelIdentifier |
||
82 | */ |
||
83 | public function storeOperatesOnASingleChannelInTheUnitedStatesNamed($channelIdentifier) |
||
90 | |||
91 | /** |
||
92 | * @Given the store operates on a single channel |
||
93 | * @Given the store operates on a single channel in :currencyCode currency |
||
94 | */ |
||
95 | public function storeOperatesOnASingleChannel($currencyCode = null) |
||
102 | |||
103 | /** |
||
104 | * @Given /^the store(?:| also) operates on (?:a|another) channel named "([^"]+)"$/ |
||
105 | * @Given /^the store(?:| also) operates on (?:a|another) channel named "([^"]+)" in "([^"]+)" currency$/ |
||
106 | * @Given the store operates on a channel identified by :code code |
||
107 | * @Given the store (also) operates on a channel named :channelName with hostname :hostname |
||
108 | */ |
||
109 | public function theStoreOperatesOnAChannelNamed(string $channelName, string $currencyCode = null, string $hostname = null): void |
||
119 | |||
120 | /** |
||
121 | * @Given the channel :channel is enabled |
||
122 | */ |
||
123 | public function theChannelIsEnabled(ChannelInterface $channel) |
||
127 | |||
128 | /** |
||
129 | * @Given the channel :channel is disabled |
||
130 | * @Given the channel :channel has been disabled |
||
131 | */ |
||
132 | public function theChannelIsDisabled(ChannelInterface $channel) |
||
136 | |||
137 | /** |
||
138 | * @Given channel :channel has been deleted |
||
139 | */ |
||
140 | public function iChannelHasBeenDeleted(ChannelInterface $channel) |
||
144 | |||
145 | /** |
||
146 | * @Given /^(its) default tax zone is (zone "([^"]+)")$/ |
||
147 | */ |
||
148 | public function itsDefaultTaxRateIs(ChannelInterface $channel, ZoneInterface $defaultTaxZone) |
||
153 | |||
154 | /** |
||
155 | * @Given /^(this channel) has contact email set as "([^"]+)"$/ |
||
156 | * @Given /^(this channel) has no contact email set$/ |
||
157 | */ |
||
158 | public function thisChannelHasContactEmailSetAs(ChannelInterface $channel, $contactEmail = null) |
||
163 | |||
164 | /** |
||
165 | * @Given /^on (this channel) shipping step is skipped if only a single shipping method is available$/ |
||
166 | */ |
||
167 | public function onThisChannelShippingStepIsSkippedIfOnlyASingleShippingMethodIsAvailable(ChannelInterface $channel) |
||
173 | |||
174 | /** |
||
175 | * @Given /^on (this channel) payment step is skipped if only a single payment method is available$/ |
||
176 | */ |
||
177 | public function onThisChannelPaymentStepIsSkippedIfOnlyASinglePaymentMethodIsAvailable( |
||
184 | |||
185 | /** |
||
186 | * @Given /^on (this channel) account verification is not required$/ |
||
187 | */ |
||
188 | public function onThisChannelAccountVerificationIsNotRequired(ChannelInterface $channel) |
||
194 | |||
195 | /** |
||
196 | * @Given channel :channel billing data is :company, :street, :postcode :city, :country with :taxId tax ID |
||
197 | */ |
||
198 | public function channelBillingDataIs( |
||
219 | |||
220 | |||
221 | /** |
||
222 | * @Given channel :channel has menu taxon :taxon |
||
223 | * @Given /^(this channel) has menu (taxon "[^"]+")$/ |
||
224 | */ |
||
225 | public function channelHasMenuTaxon(ChannelInterface $channel, TaxonInterface $taxon): void |
||
231 | |||
232 | /** |
||
233 | * @Given /^(this channel) operates in the ("[^"]+" country)$/ |
||
234 | */ |
||
235 | public function channelOperatesInCountry(ChannelInterface $channel, CountryInterface $country): void |
||
241 | |||
242 | /** |
||
243 | * @Given /^(this channel) does not define operating countries$/ |
||
244 | */ |
||
245 | public function channelDoesNotDefineOperatingCountries(ChannelInterface $channel): void |
||
253 | |||
254 | /** |
||
255 | * @param bool $state |
||
256 | */ |
||
257 | private function changeChannelState(ChannelInterface $channel, $state) |
||
263 | } |
||
264 |