@@ -12,12 +12,12 @@ |
||
12 | 12 | namespace Sylius\Component\Core\Resolver; |
13 | 13 | |
14 | 14 | use Sylius\Component\Addressing\Matcher\ZoneMatcherInterface; |
15 | -use Sylius\Component\Core\Model\Scope; |
|
16 | 15 | use Sylius\Component\Core\Model\OrderInterface; |
16 | +use Sylius\Component\Core\Model\Scope; |
|
17 | 17 | use Sylius\Component\Core\Model\ShipmentInterface; |
18 | +use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
18 | 19 | use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface; |
19 | 20 | use Sylius\Component\Shipping\Model\ShippingSubjectInterface; |
20 | -use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
21 | 21 | use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; |
22 | 22 | use Webmozart\Assert\Assert; |
23 | 23 |
@@ -14,16 +14,16 @@ |
||
14 | 14 | use PhpSpec\ObjectBehavior; |
15 | 15 | use Sylius\Component\Addressing\Matcher\ZoneMatcherInterface; |
16 | 16 | use Sylius\Component\Addressing\Model\ZoneInterface; |
17 | -use Sylius\Component\Core\Model\Scope; |
|
18 | 17 | use Sylius\Component\Core\Model\AddressInterface; |
19 | 18 | use Sylius\Component\Core\Model\ChannelInterface; |
20 | 19 | use Sylius\Component\Core\Model\OrderInterface; |
20 | +use Sylius\Component\Core\Model\Scope; |
|
21 | 21 | use Sylius\Component\Core\Model\ShipmentInterface; |
22 | 22 | use Sylius\Component\Core\Model\ShippingMethodInterface; |
23 | +use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
23 | 24 | use Sylius\Component\Core\Resolver\ZoneAndChannelBasedShippingMethodsResolver; |
24 | 25 | use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface; |
25 | 26 | use Sylius\Component\Shipping\Model\ShippingSubjectInterface; |
26 | -use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; |
|
27 | 27 | use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; |
28 | 28 | |
29 | 29 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $this->addSql('CREATE TABLE sylius_product_association_type_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT NOT NULL, name VARCHAR(255) DEFAULT NULL, locale VARCHAR(255) NOT NULL, INDEX IDX_4F618E52C2AC5D3 (translatable_id), UNIQUE INDEX sylius_product_association_type_translation_uniq_trans (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); |
38 | 38 | $this->addSql('ALTER TABLE sylius_product_association_type_translation ADD CONSTRAINT FK_4F618E52C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES sylius_product_association_type (id) ON DELETE CASCADE'); |
39 | - $this->addSql('INSERT INTO sylius_product_association_type_translation (translatable_id, name, locale) SELECT id, name, "'.$defaultLocale.'" from sylius_product_association_type WHERE sylius_product_association_type.name IS NOT null'); |
|
39 | + $this->addSql('INSERT INTO sylius_product_association_type_translation (translatable_id, name, locale) SELECT id, name, "' . $defaultLocale . '" from sylius_product_association_type WHERE sylius_product_association_type.name IS NOT null'); |
|
40 | 40 | $this->addSql('ALTER TABLE sylius_product_association_type DROP name'); |
41 | 41 | } |
42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $defaultLocale = $this->container->getParameter('locale'); |
51 | 51 | |
52 | 52 | $this->addSql('ALTER TABLE sylius_product_association_type ADD name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); |
53 | - $this->addSql('UPDATE sylius_product_association_type SET name = (SELECT name FROM sylius_product_association_type_translation WHERE sylius_product_association_type_translation.translatable_id = sylius_product_association_type.id AND sylius_product_association_type_translation.locale = "'.$defaultLocale.'")'); |
|
53 | + $this->addSql('UPDATE sylius_product_association_type SET name = (SELECT name FROM sylius_product_association_type_translation WHERE sylius_product_association_type_translation.translatable_id = sylius_product_association_type.id AND sylius_product_association_type_translation.locale = "' . $defaultLocale . '")'); |
|
54 | 54 | $this->addSql('DROP TABLE sylius_product_association_type_translation'); |
55 | 55 | } |
56 | 56 | } |
@@ -429,6 +429,8 @@ |
||
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
432 | + * @param integer $timeout |
|
433 | + * @param string $elementName |
|
432 | 434 | * @return bool |
433 | 435 | */ |
434 | 436 | private function waitForElement($timeout, $elementName) |
@@ -16,13 +16,13 @@ |
||
16 | 16 | use Sylius\Behat\NotificationType; |
17 | 17 | use Sylius\Behat\Page\Admin\Crud\CreatePageInterface; |
18 | 18 | use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface; |
19 | +use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
19 | 20 | use Sylius\Behat\Page\Admin\Product\CreateConfigurableProductPageInterface; |
20 | 21 | use Sylius\Behat\Page\Admin\Product\CreateSimpleProductPageInterface; |
21 | 22 | use Sylius\Behat\Page\Admin\Product\IndexPageInterface; |
22 | 23 | use Sylius\Behat\Page\Admin\Product\IndexPerTaxonPageInterface; |
23 | 24 | use Sylius\Behat\Page\Admin\Product\UpdateConfigurableProductPageInterface; |
24 | 25 | use Sylius\Behat\Page\Admin\Product\UpdateSimpleProductPageInterface; |
25 | -use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
26 | 26 | use Sylius\Behat\Page\SymfonyPageInterface; |
27 | 27 | use Sylius\Behat\Service\NotificationCheckerInterface; |
28 | 28 | use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; |
@@ -248,6 +248,7 @@ |
||
248 | 248 | * @Then the product :productName should appear in the store |
249 | 249 | * @Then the product :productName should be in the shop |
250 | 250 | * @Then this product should still be named :productName |
251 | + * @param string $productName |
|
251 | 252 | */ |
252 | 253 | public function theProductShouldAppearInTheShop($productName) |
253 | 254 | { |
@@ -46,7 +46,8 @@ discard block |
||
46 | 46 | $this->getAllOrdersCount()->shouldReturn(0); |
47 | 47 | } |
48 | 48 | |
49 | - function it_has_number_of_all_orders(ChannelInterface $channel) { |
|
49 | + function it_has_number_of_all_orders(ChannelInterface $channel) |
|
50 | + { |
|
50 | 51 | $firstStatistics = new PerChannelCustomerStatistics(110, 120, $channel->getWrappedObject()); |
51 | 52 | $secondStatistics = new PerChannelCustomerStatistics(13, 120, $channel->getWrappedObject()); |
52 | 53 | |
@@ -55,7 +56,8 @@ discard block |
||
55 | 56 | $this->getAllOrdersCount()->shouldReturn(123); |
56 | 57 | } |
57 | 58 | |
58 | - function it_has_an_array_of_statistics_per_channel(ChannelInterface $channel) { |
|
59 | + function it_has_an_array_of_statistics_per_channel(ChannelInterface $channel) |
|
60 | + { |
|
59 | 61 | $firstStatistics = new PerChannelCustomerStatistics(110, 120, $channel->getWrappedObject()); |
60 | 62 | $secondStatistics = new PerChannelCustomerStatistics(13, 120, $channel->getWrappedObject()); |
61 | 63 |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
188 | 188 | $customers = $this->loadFixturesFromFile('resources/customers.yml'); |
189 | 189 | |
190 | - $this->client->request('GET', '/api/v1/customers/'.$customers['customer_Barry']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
190 | + $this->client->request('GET', '/api/v1/customers/' . $customers['customer_Barry']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
191 | 191 | |
192 | 192 | $response = $this->client->getResponse(); |
193 | 193 | $this->assertResponse($response, 'customer/show_response', Response::HTTP_OK); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
202 | 202 | $customers = $this->loadFixturesFromFile('resources/customers.yml'); |
203 | 203 | |
204 | - $this->client->request('GET', '/api/v1/customers/'.$customers['customer_Roy']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
204 | + $this->client->request('GET', '/api/v1/customers/' . $customers['customer_Roy']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
205 | 205 | |
206 | 206 | $response = $this->client->getResponse(); |
207 | 207 | $this->assertResponse($response, 'customer/show_with_user_response', Response::HTTP_OK); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
240 | 240 | $customers = $this->loadFixturesFromFile('resources/customers.yml'); |
241 | 241 | |
242 | - $this->client->request('PUT', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
242 | + $this->client->request('PUT', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
243 | 243 | |
244 | 244 | $response = $this->client->getResponse(); |
245 | 245 | $this->assertResponse($response, 'customer/update_validation_fail_response', Response::HTTP_BAD_REQUEST); |
@@ -263,12 +263,12 @@ discard block |
||
263 | 263 | } |
264 | 264 | EOT; |
265 | 265 | |
266 | - $this->client->request('PUT', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
266 | + $this->client->request('PUT', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
267 | 267 | |
268 | 268 | $response = $this->client->getResponse(); |
269 | 269 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
270 | 270 | |
271 | - $this->client->request('GET', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
271 | + $this->client->request('GET', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
272 | 272 | |
273 | 273 | $response = $this->client->getResponse(); |
274 | 274 | $this->assertResponse($response, 'customer/update_response', Response::HTTP_OK); |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | } |
304 | 304 | EOT; |
305 | 305 | |
306 | - $this->client->request('PATCH', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
306 | + $this->client->request('PATCH', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
307 | 307 | |
308 | 308 | $response = $this->client->getResponse(); |
309 | 309 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
310 | 310 | |
311 | - $this->client->request('GET', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
311 | + $this->client->request('GET', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
312 | 312 | |
313 | 313 | $response = $this->client->getResponse(); |
314 | 314 | $this->assertResponse($response, 'customer/partial_update_response', Response::HTTP_OK); |
@@ -346,12 +346,12 @@ discard block |
||
346 | 346 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
347 | 347 | $customers = $this->loadFixturesFromFile('resources/customers.yml'); |
348 | 348 | |
349 | - $this->client->request('DELETE', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
349 | + $this->client->request('DELETE', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
350 | 350 | |
351 | 351 | $response = $this->client->getResponse(); |
352 | 352 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
353 | 353 | |
354 | - $this->client->request('GET', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
354 | + $this->client->request('GET', '/api/v1/customers/' . $customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
355 | 355 | |
356 | 356 | $response = $this->client->getResponse(); |
357 | 357 | $this->assertResponse($response, 'error/not_found_response', Response::HTTP_NOT_FOUND); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | "enabled": "true" |
74 | 74 | } |
75 | 75 | } |
76 | -EOT; |
|
76 | +eot; |
|
77 | 77 | |
78 | 78 | $this->client->request('POST', '/api/v1/customers/', [], [], static::$authorizedHeaderWithContentType, $data); |
79 | 79 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | "email": "[email protected]", |
97 | 97 | "gender": "m" |
98 | 98 | } |
99 | -EOT; |
|
99 | +eot; |
|
100 | 100 | |
101 | 101 | $this->client->request('POST', '/api/v1/customers/', [], [], static::$authorizedHeaderWithContentType, $data); |
102 | 102 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | "plainPassword" : "testPassword" |
123 | 123 | } |
124 | 124 | } |
125 | -EOT; |
|
125 | +eot; |
|
126 | 126 | |
127 | 127 | $this->client->request('POST', '/api/v1/customers/', [], [], static::$authorizedHeaderWithContentType, $data); |
128 | 128 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | "email": "[email protected]", |
262 | 262 | "gender": "m" |
263 | 263 | } |
264 | -EOT; |
|
264 | +eot; |
|
265 | 265 | |
266 | 266 | $this->client->request('PUT', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
267 | 267 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | "firstName": "John", |
302 | 302 | "lastName": "Doe" |
303 | 303 | } |
304 | -EOT; |
|
304 | +eot; |
|
305 | 305 | |
306 | 306 | $this->client->request('PATCH', '/api/v1/customers/'.$customers['customer_Oliver']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
307 | 307 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
47 | 47 | $countryData = $this->loadFixturesFromFile('resources/countries.yml'); |
48 | 48 | |
49 | - $this->client->request('GET', '/api/v1/countries/'.$countryData['country_BE']->getCode().'/provinces/'.$countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
49 | + $this->client->request('GET', '/api/v1/countries/' . $countryData['country_BE']->getCode() . '/provinces/' . $countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
50 | 50 | |
51 | 51 | $response = $this->client->getResponse(); |
52 | 52 | $this->assertResponse($response, 'province/show_response', Response::HTTP_OK); |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
61 | 61 | $countryData = $this->loadFixturesFromFile('resources/countries.yml'); |
62 | 62 | |
63 | - $this->client->request('DELETE', '/api/v1/countries/'.$countryData['country_BE']->getCode().'/provinces/'.$countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
63 | + $this->client->request('DELETE', '/api/v1/countries/' . $countryData['country_BE']->getCode() . '/provinces/' . $countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
64 | 64 | |
65 | 65 | $response = $this->client->getResponse(); |
66 | 66 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
67 | 67 | |
68 | - $this->client->request('GET', '/api/v1/countries/'.$countryData['country_BE']->getCode().'/provinces/'.$countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
68 | + $this->client->request('GET', '/api/v1/countries/' . $countryData['country_BE']->getCode() . '/provinces/' . $countryData['province_BE_limburg']->getCode(), [], [], static::$authorizedHeaderWithContentType); |
|
69 | 69 | |
70 | 70 | $response = $this->client->getResponse(); |
71 | 71 | $this->assertResponse($response, 'error/not_found_response', Response::HTTP_NOT_FOUND); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | EOT; |
74 | 74 | |
75 | - $this->client->request('PUT', '/v1/comic-books/'. $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
|
75 | + $this->client->request('PUT', '/v1/comic-books/' . $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
|
76 | 76 | $response = $this->client->getResponse(); |
77 | 77 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
78 | 78 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | EOT; |
94 | 94 | |
95 | - $this->client->request('PATCH', '/v1/comic-books/'. $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
|
95 | + $this->client->request('PATCH', '/v1/comic-books/' . $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
|
96 | 96 | $response = $this->client->getResponse(); |
97 | 97 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
98 | 98 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $objects = $this->loadFixturesFromFile('comic_books.yml'); |
106 | 106 | |
107 | - $this->client->request('DELETE', '/v1/comic-books/'. $objects["comic-book1"]->getId()); |
|
107 | + $this->client->request('DELETE', '/v1/comic-books/' . $objects["comic-book1"]->getId()); |
|
108 | 108 | $response = $this->client->getResponse(); |
109 | 109 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
110 | 110 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | { |
117 | 117 | $objects = $this->loadFixturesFromFile('comic_books.yml'); |
118 | 118 | |
119 | - $this->client->request('GET', '/v1/comic-books/'. $objects["comic-book1"]->getId()); |
|
119 | + $this->client->request('GET', '/v1/comic-books/' . $objects["comic-book1"]->getId()); |
|
120 | 120 | $response = $this->client->getResponse(); |
121 | 121 | $this->assertResponse($response, 'comic-books/show_response'); |
122 | 122 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | { |
129 | 129 | $objects = $this->loadFixturesFromFile('comic_books.yml'); |
130 | 130 | |
131 | - $this->client->request('GET', '/v1.2/comic-books/'. $objects["comic-book1"]->getId()); |
|
131 | + $this->client->request('GET', '/v1.2/comic-books/' . $objects["comic-book1"]->getId()); |
|
132 | 132 | $response = $this->client->getResponse(); |
133 | 133 | $this->assertResponse($response, 'comic-books/versioned_show_response'); |
134 | 134 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $objects = $this->loadFixturesFromFile('comic_books.yml'); |
86 | 86 | |
87 | 87 | $data = |
88 | - <<<EOT |
|
88 | + <<<EOT |
|
89 | 89 | { |
90 | 90 | "authorFirstName": "Joe", |
91 | 91 | "authorLastName": "Kelly" |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | "authorFirstName": "Joe", |
32 | 32 | "authorLastName": "Kelly" |
33 | 33 | } |
34 | -EOT; |
|
34 | +eot; |
|
35 | 35 | |
36 | 36 | $this->client->request('POST', '/v1/comic-books/', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
37 | 37 | $response = $this->client->getResponse(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | "authorFirstName": "Joe", |
50 | 50 | "authorLastName": "Kelly" |
51 | 51 | } |
52 | -EOT; |
|
52 | +eot; |
|
53 | 53 | |
54 | 54 | $this->client->request('POST', '/v1.2/comic-books/', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
55 | 55 | $response = $this->client->getResponse(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | "authorFirstName": "Joe", |
71 | 71 | "authorLastName": "Kelly" |
72 | 72 | } |
73 | -EOT; |
|
73 | +eot; |
|
74 | 74 | |
75 | 75 | $this->client->request('PUT', '/v1/comic-books/'. $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
76 | 76 | $response = $this->client->getResponse(); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | "authorFirstName": "Joe", |
91 | 91 | "authorLastName": "Kelly" |
92 | 92 | } |
93 | -EOT; |
|
93 | +eot; |
|
94 | 94 | |
95 | 95 | $this->client->request('PATCH', '/v1/comic-books/'. $objects["comic-book1"]->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
96 | 96 | $response = $this->client->getResponse(); |