1 | <?php |
||
24 | class ShippingContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var RepositoryInterface |
||
28 | */ |
||
29 | private $shippingMethodRepository; |
||
30 | |||
31 | /** |
||
32 | * @var FactoryInterface |
||
33 | */ |
||
34 | private $shippingMethodFactory; |
||
35 | |||
36 | /** |
||
37 | * @var SharedStorageInterface |
||
38 | */ |
||
39 | private $sharedStorage; |
||
40 | |||
41 | /** |
||
42 | * @param RepositoryInterface $shippingMethodRepository |
||
43 | * @param FactoryInterface $shippingMethodFactory |
||
44 | * @param SharedStorageInterface $sharedStorage |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @Transform :shippingMethodName shipping method |
||
58 | * @Transform shipping method :shippingMethodName |
||
59 | */ |
||
60 | public function getShippingMethodByName($shippingMethodName) |
||
69 | |||
70 | /** |
||
71 | * @Given store ships everything for free |
||
72 | */ |
||
73 | public function storeShipsEverythingForFree() |
||
77 | |||
78 | /** |
||
79 | * @Given /^store has "([^"]*)" shipping method with "(?:€|£|\$)([^"]*)" fee$/ |
||
80 | */ |
||
81 | public function storeHasShippingMethodWithFee($shippingMethodName, $fee) |
||
85 | |||
86 | /** |
||
87 | * @param string $name |
||
88 | * @param string $locale |
||
89 | * @param array $configuration |
||
90 | * @param string $calculator |
||
91 | * @param ZoneInterface|null $zone |
||
92 | */ |
||
93 | private function createShippingMethod( |
||
114 | |||
115 | /** |
||
116 | * @param string $shippingMethodName |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | private function getCodeFromName($shippingMethodName) |
||
124 | |||
125 | /** |
||
126 | * @param string $shippingMethodFee |
||
127 | * |
||
128 | * @return string |
||
129 | */ |
||
130 | private function getFeeFromString($shippingMethodFee) |
||
134 | } |
||
135 |