@@ -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(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
147 | 147 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
148 | 148 | |
149 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
149 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
150 | 150 | |
151 | 151 | $response = $this->client->getResponse(); |
152 | 152 | $this->assertResponse($response, 'zone/show_response', Response::HTTP_OK); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
185 | 185 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
186 | 186 | |
187 | - $this->client->request('PUT', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
187 | + $this->client->request('PUT', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
188 | 188 | |
189 | 189 | $response = $this->client->getResponse(); |
190 | 190 | $this->assertResponse($response, 'zone/update_validation_fail_response', Response::HTTP_BAD_REQUEST); |
@@ -211,12 +211,12 @@ discard block |
||
211 | 211 | } |
212 | 212 | EOT; |
213 | 213 | |
214 | - $this->client->request('PUT', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
214 | + $this->client->request('PUT', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
215 | 215 | |
216 | 216 | $response = $this->client->getResponse(); |
217 | 217 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
218 | 218 | |
219 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
219 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
220 | 220 | |
221 | 221 | $response = $this->client->getResponse(); |
222 | 222 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -262,12 +262,12 @@ discard block |
||
262 | 262 | } |
263 | 263 | EOT; |
264 | 264 | |
265 | - $this->client->request('PATCH', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
265 | + $this->client->request('PATCH', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
266 | 266 | |
267 | 267 | $response = $this->client->getResponse(); |
268 | 268 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
269 | 269 | |
270 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
270 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
271 | 271 | |
272 | 272 | $response = $this->client->getResponse(); |
273 | 273 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -305,12 +305,12 @@ discard block |
||
305 | 305 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
306 | 306 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
307 | 307 | |
308 | - $this->client->request('DELETE', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
308 | + $this->client->request('DELETE', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
309 | 309 | |
310 | 310 | $response = $this->client->getResponse(); |
311 | 311 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
312 | 312 | |
313 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
313 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
314 | 314 | |
315 | 315 | $response = $this->client->getResponse(); |
316 | 316 | $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(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
41 | 41 | $channelData = $this->loadFixturesFromFile('resources/channels.yml'); |
42 | 42 | |
43 | - $this->client->request('GET', '/api/channels/'.$channelData['channel-web']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
43 | + $this->client->request('GET', '/api/channels/' . $channelData['channel-web']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
44 | 44 | |
45 | 45 | $response = $this->client->getResponse(); |
46 | 46 | $this->assertResponse($response, 'channel/show_response', Response::HTTP_OK); |
@@ -15,9 +15,9 @@ |
||
15 | 15 | use Sylius\Behat\Page\Admin\Channel\IndexPageInterface; |
16 | 16 | use Sylius\Behat\Page\Admin\Channel\UpdatePageInterface; |
17 | 17 | use Sylius\Behat\Page\Shop\HomePageInterface; |
18 | +use Sylius\Behat\Service\SharedStorageInterface; |
|
18 | 19 | use Sylius\Bundle\ThemeBundle\Model\ThemeInterface; |
19 | 20 | use Sylius\Component\Core\Model\ChannelInterface; |
20 | -use Sylius\Behat\Service\SharedStorageInterface; |
|
21 | 21 | use Webmozart\Assert\Assert; |
22 | 22 | |
23 | 23 | /** |
@@ -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 | /** |
@@ -19,10 +19,10 @@ |
||
19 | 19 | use Sylius\Component\Core\Model\OrderInterface; |
20 | 20 | use Sylius\Component\Core\Model\ShipmentInterface; |
21 | 21 | use Sylius\Component\Core\Model\ShippingMethodInterface; |
22 | +use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
22 | 23 | use Sylius\Component\Core\Resolver\ZoneAndChannelBasedShippingMethodsResolver; |
23 | 24 | use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface; |
24 | 25 | use Sylius\Component\Shipping\Model\ShippingSubjectInterface; |
25 | -use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
26 | 26 | use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; |
27 | 27 | |
28 | 28 | /** |
@@ -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]> |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $imageForm = $this->getLastImageElement(); |
56 | 56 | $imageForm->fillField('Code', $code); |
57 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
57 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use Behat\Mink\Driver\Selenium2Driver; |
15 | 15 | use Behat\Mink\Element\NodeElement; |
16 | 16 | use Behat\Mink\Exception\ElementNotFoundException; |
17 | -use Behat\Mink\Exception\UnsupportedDriverActionException; |
|
18 | 17 | use Sylius\Behat\Behaviour\SpecifiesItsCode; |
19 | 18 | use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage; |
20 | 19 | use Sylius\Component\Core\Model\TaxonInterface; |
@@ -199,6 +199,7 @@ |
||
199 | 199 | |
200 | 200 | /** |
201 | 201 | * {@inheritdoc} |
202 | + * @param string $name |
|
202 | 203 | */ |
203 | 204 | protected function getElement($name, array $parameters = []) |
204 | 205 | { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | $imageForm = $this->getLastImageElement(); |
154 | 154 | $imageForm->fillField('Code', $code); |
155 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
155 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $filesPath = $this->getParameter('files_path'); |
164 | 164 | |
165 | 165 | $imageForm = $this->getImageElementByCode($code); |
166 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
166 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | private function getImageElementByCode($code) |
262 | 262 | { |
263 | 263 | $images = $this->getElement('images'); |
264 | - $inputCode = $images->find('css', 'input[value="'.$code.'"]'); |
|
264 | + $inputCode = $images->find('css', 'input[value="' . $code . '"]'); |
|
265 | 265 | |
266 | 266 | if (null === $inputCode) { |
267 | 267 | return null; |