@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | "username": "[email protected]", |
36 | 36 | "password": "sylius" |
37 | 37 | } |
38 | -EOT; |
|
38 | +eot; |
|
39 | 39 | |
40 | 40 | $this->client->request('POST', '/api/oauth/v2/token', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
41 | 41 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | "grant_type": "refresh_token", |
59 | 59 | "refresh_token": "SampleRefreshTokenODllODY4ZTQyOThlNWIyMjA1ZDhmZjE1ZDYyMGMwOTUxOWM2NGFmNGRjNjQ2NDBhMDVlNGZjMmQ0YzgyNDM2Ng" |
60 | 60 | } |
61 | -EOT; |
|
61 | +eot; |
|
62 | 62 | |
63 | 63 | $this->client->request('POST', '/api/oauth/v2/token', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
64 | 64 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | "email": "[email protected]" |
74 | 74 | } |
75 | 75 | } |
76 | -EOT; |
|
76 | +eot; |
|
77 | 77 | |
78 | 78 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
79 | 79 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | "email": "[email protected]" |
108 | 108 | } |
109 | 109 | } |
110 | -EOT; |
|
110 | +eot; |
|
111 | 111 | |
112 | 112 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
113 | 113 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | "email": "[email protected]" |
143 | 143 | } |
144 | 144 | } |
145 | -EOT; |
|
145 | +eot; |
|
146 | 146 | |
147 | 147 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
148 | 148 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | "email": "[email protected]" |
185 | 185 | } |
186 | 186 | } |
187 | -EOT; |
|
187 | +eot; |
|
188 | 188 | |
189 | 189 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
190 | 190 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | "email": "[email protected]" |
224 | 224 | } |
225 | 225 | } |
226 | -EOT; |
|
226 | +eot; |
|
227 | 227 | |
228 | 228 | $orderId = $checkoutData['order1']->getId(); |
229 | 229 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | }, |
244 | 244 | "differentBillingAddress": false |
245 | 245 | } |
246 | -EOT; |
|
246 | +eot; |
|
247 | 247 | |
248 | 248 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
249 | 249 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $newData); |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | "email": "[email protected]" |
278 | 278 | } |
279 | 279 | } |
280 | -EOT; |
|
280 | +eot; |
|
281 | 281 | |
282 | 282 | $orderId = $checkoutData['order1']->getId(); |
283 | 283 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | }, |
300 | 300 | "differentBillingAddress": false |
301 | 301 | } |
302 | -EOT; |
|
302 | +eot; |
|
303 | 303 | |
304 | 304 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
305 | 305 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $newAddressData); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | "email": "[email protected]" |
334 | 334 | } |
335 | 335 | } |
336 | -EOT; |
|
336 | +eot; |
|
337 | 337 | |
338 | 338 | $orderId = $checkoutData['order1']->getId(); |
339 | 339 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | }, |
357 | 357 | "differentBillingAddress": false |
358 | 358 | } |
359 | -EOT; |
|
359 | +eot; |
|
360 | 360 | |
361 | 361 | $url = sprintf('/api/checkouts/addressing/%d', $checkoutData['order1']->getId()); |
362 | 362 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $newAddressData); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | }, |
35 | 35 | "author": "Christie Golden" |
36 | 36 | } |
37 | -EOT; |
|
37 | +eot; |
|
38 | 38 | |
39 | 39 | $this->client->request('POST', '/books/', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
40 | 40 | $response = $this->client->getResponse(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | }, |
62 | 62 | "author": "Christie Golden" |
63 | 63 | } |
64 | -EOT; |
|
64 | +eot; |
|
65 | 65 | |
66 | 66 | $this->client->request('PUT', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
67 | 67 | $response = $this->client->getResponse(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | "author": "Christie Golden" |
82 | 82 | } |
83 | -EOT; |
|
83 | +eot; |
|
84 | 84 | |
85 | 85 | $this->client->request('PATCH', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
86 | 86 | $response = $this->client->getResponse(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | ] |
88 | 88 | } |
89 | -EOT; |
|
89 | +eot; |
|
90 | 90 | |
91 | 91 | $url = sprintf('/api/checkouts/select-shipping/%d', $orderId); |
92 | 92 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | ] |
118 | 118 | } |
119 | -EOT; |
|
119 | +eot; |
|
120 | 120 | |
121 | 121 | $url = sprintf('/api/checkouts/select-shipping/%d', $orderId); |
122 | 122 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | ] |
153 | 153 | } |
154 | -EOT; |
|
154 | +eot; |
|
155 | 155 | |
156 | 156 | $url = sprintf('/api/checkouts/select-shipping/%d', $orderId); |
157 | 157 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | ] |
184 | 184 | } |
185 | -EOT; |
|
185 | +eot; |
|
186 | 186 | |
187 | 187 | $url = sprintf('/api/checkouts/select-shipping/%d', $orderId); |
188 | 188 | $this->client->request('PUT', $url, [], [], static::$authorizedHeaderWithContentType, $data); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | }, |
35 | 35 | "author": "Christie Golden" |
36 | 36 | } |
37 | -EOT; |
|
37 | +eot; |
|
38 | 38 | |
39 | 39 | $this->client->request('POST', '/books/', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
40 | 40 | $response = $this->client->getResponse(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | }, |
62 | 62 | "author": "Christie Golden" |
63 | 63 | } |
64 | -EOT; |
|
64 | +eot; |
|
65 | 65 | |
66 | 66 | $this->client->request('PUT', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
67 | 67 | $response = $this->client->getResponse(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | "author": "Christie Golden" |
82 | 82 | } |
83 | -EOT; |
|
83 | +eot; |
|
84 | 84 | |
85 | 85 | $this->client->request('PATCH', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
86 | 86 | $response = $this->client->getResponse(); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
148 | 148 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
149 | 149 | |
150 | - $this->client->request('GET', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
150 | + $this->client->request('GET', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
151 | 151 | |
152 | 152 | $response = $this->client->getResponse(); |
153 | 153 | $this->assertResponse($response, 'zone/show_response', Response::HTTP_OK); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $this->loadFixturesFromFile('resources/countries.yml'); |
187 | 187 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
188 | 188 | |
189 | - $this->client->request('PUT', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
189 | + $this->client->request('PUT', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
190 | 190 | |
191 | 191 | $response = $this->client->getResponse(); |
192 | 192 | $this->assertResponse($response, 'zone/update_validation_fail_response', Response::HTTP_BAD_REQUEST); |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | } |
215 | 215 | EOT; |
216 | 216 | |
217 | - $this->client->request('PUT', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
217 | + $this->client->request('PUT', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
218 | 218 | |
219 | 219 | $response = $this->client->getResponse(); |
220 | 220 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
221 | 221 | |
222 | - $this->client->request('GET', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
222 | + $this->client->request('GET', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
223 | 223 | |
224 | 224 | $response = $this->client->getResponse(); |
225 | 225 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -265,12 +265,12 @@ discard block |
||
265 | 265 | } |
266 | 266 | EOT; |
267 | 267 | |
268 | - $this->client->request('PATCH', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
268 | + $this->client->request('PATCH', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
269 | 269 | |
270 | 270 | $response = $this->client->getResponse(); |
271 | 271 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
272 | 272 | |
273 | - $this->client->request('GET', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
273 | + $this->client->request('GET', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
274 | 274 | |
275 | 275 | $response = $this->client->getResponse(); |
276 | 276 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -308,12 +308,12 @@ discard block |
||
308 | 308 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
309 | 309 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
310 | 310 | |
311 | - $this->client->request('DELETE', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
311 | + $this->client->request('DELETE', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
312 | 312 | |
313 | 313 | $response = $this->client->getResponse(); |
314 | 314 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
315 | 315 | |
316 | - $this->client->request('GET', '/api/v1/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
316 | + $this->client->request('GET', '/api/v1/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
317 | 317 | |
318 | 318 | $response = $this->client->getResponse(); |
319 | 319 | $this->assertResponseCode($response, Response::HTTP_NOT_FOUND); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | }, |
35 | 35 | "author": "Christie Golden" |
36 | 36 | } |
37 | -EOT; |
|
37 | +eot; |
|
38 | 38 | |
39 | 39 | $this->client->request('POST', '/books/', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
40 | 40 | $response = $this->client->getResponse(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | }, |
62 | 62 | "author": "Christie Golden" |
63 | 63 | } |
64 | -EOT; |
|
64 | +eot; |
|
65 | 65 | |
66 | 66 | $this->client->request('PUT', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
67 | 67 | $response = $this->client->getResponse(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | "author": "Christie Golden" |
82 | 82 | } |
83 | -EOT; |
|
83 | +eot; |
|
84 | 84 | |
85 | 85 | $this->client->request('PATCH', '/books/'. $objects["book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
86 | 86 | $response = $this->client->getResponse(); |
@@ -20,6 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | /** |
22 | 22 | * @param string $paymentMethod |
23 | + * @return void |
|
23 | 24 | */ |
24 | 25 | public function selectPaymentMethod($paymentMethod); |
25 | 26 | |
@@ -37,12 +38,24 @@ discard block |
||
37 | 38 | */ |
38 | 39 | public function getItemSubtotal($itemName); |
39 | 40 | |
41 | + /** |
|
42 | + * @return void |
|
43 | + */ |
|
40 | 44 | public function nextStep(); |
41 | 45 | |
46 | + /** |
|
47 | + * @return void |
|
48 | + */ |
|
42 | 49 | public function changeShippingMethod(); |
43 | 50 | |
51 | + /** |
|
52 | + * @return void |
|
53 | + */ |
|
44 | 54 | public function changeShippingMethodByStepLabel(); |
45 | 55 | |
56 | + /** |
|
57 | + * @return void |
|
58 | + */ |
|
46 | 59 | public function changeAddressByStepLabel(); |
47 | 60 | |
48 | 61 | /** |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use Sylius\Component\Core\Model\AddressInterface; |
16 | 16 | use Sylius\Component\Core\Model\ProductInterface; |
17 | 17 | use Sylius\Component\Core\Model\ShippingMethodInterface; |
18 | -use Sylius\Component\Payment\Model\PaymentMethodInterface; |
|
19 | 18 | |
20 | 19 | /** |
21 | 20 | * @author Mateusz Zalewski <[email protected]> |
@@ -13,11 +13,11 @@ |
||
13 | 13 | |
14 | 14 | use SM\Factory\FactoryInterface; |
15 | 15 | use SM\StateMachine\StateMachineInterface; |
16 | -use Sylius\Component\Order\Model\OrderInterface; |
|
17 | -use Sylius\Component\Order\StateResolver\StateResolverInterface; |
|
18 | 16 | use Sylius\Component\Core\Model\ShipmentInterface; |
19 | 17 | use Sylius\Component\Core\OrderShippingStates; |
20 | 18 | use Sylius\Component\Core\OrderShippingTransitions; |
19 | +use Sylius\Component\Order\Model\OrderInterface; |
|
20 | +use Sylius\Component\Order\StateResolver\StateResolverInterface; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @author Paweł Jędrzejewski <[email protected]> |