@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | {$this->generateMatchMethod($supportsRedirections)} |
80 | 80 | } |
81 | 81 | |
82 | -EOF; |
|
82 | +eof; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | $code |
123 | 123 | |
124 | -EOF; |
|
124 | +eof; |
|
125 | 125 | |
126 | 126 | if ($supportsRedirections) { |
127 | 127 | return <<<'EOF' |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | private function doMatch(string $rawPathinfo, array &$allow = array(), array &$allowSchemes = array()): ?array |
164 | 164 | |
165 | -EOF |
|
165 | +eof |
|
166 | 166 | . $code . "\n return null;\n }"; |
167 | 167 | } |
168 | 168 | |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | } |
296 | 296 | list(\$ret, \$requiredHost, \$requiredMethods, \$requiredSchemes) = \$routes[\$pathinfo]; |
297 | 297 | {$this->compileSwitchDefault(false, $matchHost)} |
298 | -EOF; |
|
298 | +eof; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | return sprintf(" switch (\$pathinfo) {\n%s }\n\n", $this->indent($code)); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | |
432 | 432 | list(\$ret, \$vars, \$requiredMethods, \$requiredSchemes) = \$routes[\$m]; |
433 | 433 | {$this->compileSwitchDefault(true, $matchHost)} |
434 | -EOF; |
|
434 | +eof; |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | $matchedPathinfo = $matchHost ? '$host.\'.\'.$pathinfo' : '$pathinfo'; |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | } |
456 | 456 | } |
457 | 457 | |
458 | -EOF; |
|
458 | +eof; |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | /** |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | {$combine}{$this->compileRoute($route, $name, false)} |
530 | 530 | break; |
531 | 531 | |
532 | -EOF; |
|
532 | +eof; |
|
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | } |
551 | 551 | } |
552 | 552 | |
553 | -EOF; |
|
553 | +eof; |
|
554 | 554 | } elseif ($matchHost) { |
555 | 555 | $code = <<<EOF |
556 | 556 | |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | } |
565 | 565 | } |
566 | 566 | |
567 | -EOF; |
|
567 | +eof; |
|
568 | 568 | } else { |
569 | 569 | $code = ''; |
570 | 570 | } |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | |
586 | 586 | return \$ret; |
587 | 587 | |
588 | -EOF; |
|
588 | +eof; |
|
589 | 589 | |
590 | 590 | return $code; |
591 | 591 | } |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | // $name |
629 | 629 | if ($conditions) { |
630 | 630 | |
631 | -EOF; |
|
631 | +eof; |
|
632 | 632 | } else { |
633 | 633 | $code .= " // {$name}\n"; |
634 | 634 | } |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | } |
688 | 688 | |
689 | 689 | |
690 | -EOF; |
|
690 | +eof; |
|
691 | 691 | } else { |
692 | 692 | $code .= <<<EOF |
693 | 693 | \$requiredSchemes = $schemes; |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | } |
698 | 698 | |
699 | 699 | |
700 | -EOF; |
|
700 | +eof; |
|
701 | 701 | } |
702 | 702 | } elseif ($methods) { |
703 | 703 | $code .= <<<EOF |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | } |
708 | 708 | |
709 | 709 | |
710 | -EOF; |
|
710 | +eof; |
|
711 | 711 | } |
712 | 712 | |
713 | 713 | if ($schemes || $methods) { |
@@ -18,15 +18,30 @@ |
||
18 | 18 | |
19 | 19 | interface CreateConfigurableProductPageInterface extends BaseCreatePageInterface |
20 | 20 | { |
21 | + /** |
|
22 | + * @return void |
|
23 | + */ |
|
21 | 24 | public function selectOption(string $optionName): void; |
22 | 25 | |
26 | + /** |
|
27 | + * @return void |
|
28 | + */ |
|
23 | 29 | public function specifyCode(string $code): void; |
24 | 30 | |
31 | + /** |
|
32 | + * @return void |
|
33 | + */ |
|
25 | 34 | public function nameItIn(string $name, string $localeCode): void; |
26 | 35 | |
27 | 36 | public function isMainTaxonChosen(string $taxonName): bool; |
28 | 37 | |
38 | + /** |
|
39 | + * @return void |
|
40 | + */ |
|
29 | 41 | public function selectMainTaxon(TaxonInterface $taxon): void; |
30 | 42 | |
43 | + /** |
|
44 | + * @return void |
|
45 | + */ |
|
31 | 46 | public function attachImage(string $path, ?string $type = null): void; |
32 | 47 | } |
@@ -19,42 +19,90 @@ |
||
19 | 19 | |
20 | 20 | interface CreateSimpleProductPageInterface extends BaseCreatePageInterface |
21 | 21 | { |
22 | + /** |
|
23 | + * @return void |
|
24 | + */ |
|
22 | 25 | public function specifyPrice(string $channelName, string $price): void; |
23 | 26 | |
27 | + /** |
|
28 | + * @return void |
|
29 | + */ |
|
24 | 30 | public function specifyOriginalPrice(string $channelName, int $originalPrice): void; |
25 | 31 | |
32 | + /** |
|
33 | + * @return void |
|
34 | + */ |
|
26 | 35 | public function choosePricingCalculator(string $name): void; |
27 | 36 | |
37 | + /** |
|
38 | + * @return void |
|
39 | + */ |
|
28 | 40 | public function checkChannel(string $channelName): void; |
29 | 41 | |
42 | + /** |
|
43 | + * @return void |
|
44 | + */ |
|
30 | 45 | public function specifyCode(string $code): void; |
31 | 46 | |
47 | + /** |
|
48 | + * @return void |
|
49 | + */ |
|
32 | 50 | public function nameItIn(string $name, string $localeCode): void; |
33 | 51 | |
52 | + /** |
|
53 | + * @return void |
|
54 | + */ |
|
34 | 55 | public function specifySlugIn(?string $slug, string $locale): void; |
35 | 56 | |
57 | + /** |
|
58 | + * @return void |
|
59 | + */ |
|
36 | 60 | public function addAttribute(string $attributeName, string $value, string $localeCode): void; |
37 | 61 | |
38 | 62 | public function getAttributeValidationErrors(string $attributeName, string $localeCode): string; |
39 | 63 | |
64 | + /** |
|
65 | + * @return void |
|
66 | + */ |
|
40 | 67 | public function removeAttribute(string $attributeName, string $localeCode): void; |
41 | 68 | |
42 | 69 | public function isMainTaxonChosen(string $taxonName): bool; |
43 | 70 | |
71 | + /** |
|
72 | + * @return void |
|
73 | + */ |
|
44 | 74 | public function selectMainTaxon(TaxonInterface $taxon): void; |
45 | 75 | |
76 | + /** |
|
77 | + * @param string $type |
|
78 | + * |
|
79 | + * @return void |
|
80 | + */ |
|
46 | 81 | public function attachImage(string $path, ?string $type = null): void; |
47 | 82 | |
48 | 83 | /** |
49 | 84 | * @param string[] $productsNames |
85 | + * @return void |
|
50 | 86 | */ |
51 | 87 | public function associateProducts(ProductAssociationTypeInterface $productAssociationType, array $productsNames): void; |
52 | 88 | |
89 | + /** |
|
90 | + * @return void |
|
91 | + */ |
|
53 | 92 | public function removeAssociatedProduct(string $productName, ProductAssociationTypeInterface $productAssociationType): void; |
54 | 93 | |
94 | + /** |
|
95 | + * @return void |
|
96 | + */ |
|
55 | 97 | public function activateLanguageTab(string $locale): void; |
56 | 98 | |
99 | + /** |
|
100 | + * @return void |
|
101 | + */ |
|
57 | 102 | public function selectShippingCategory(string $shippingCategoryName): void; |
58 | 103 | |
104 | + /** |
|
105 | + * @return void |
|
106 | + */ |
|
59 | 107 | public function setShippingRequired(bool $isShippingRequired): void; |
60 | 108 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | } |
147 | 147 | } |
148 | -EOT; |
|
148 | +eot; |
|
149 | 149 | |
150 | 150 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
151 | 151 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
177 | -EOT; |
|
177 | +eot; |
|
178 | 178 | |
179 | 179 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
180 | 180 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | } |
217 | 217 | } |
218 | -EOT; |
|
218 | +eot; |
|
219 | 219 | $this->client->request('PUT', $this->getProductUrl($product), [], [], static::$authorizedHeaderWithContentType, $data); |
220 | 220 | $response = $this->client->getResponse(); |
221 | 221 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | } |
243 | 243 | } |
244 | -EOT; |
|
244 | +eot; |
|
245 | 245 | $this->client->request('PATCH', $this->getProductUrl($product), [], [], static::$authorizedHeaderWithContentType, $data); |
246 | 246 | $response = $this->client->getResponse(); |
247 | 247 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | } |
300 | 300 | } |
301 | 301 | } |
302 | -EOT; |
|
302 | +eot; |
|
303 | 303 | |
304 | 304 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
305 | 305 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | } |
329 | 329 | } |
330 | 330 | } |
331 | -EOT; |
|
331 | +eot; |
|
332 | 332 | |
333 | 333 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
334 | 334 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | }, |
358 | 358 | "productTaxons": "category,mugs" |
359 | 359 | } |
360 | -EOT; |
|
360 | +eot; |
|
361 | 361 | |
362 | 362 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
363 | 363 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | } |
387 | 387 | } |
388 | -EOT; |
|
388 | +eot; |
|
389 | 389 | |
390 | 390 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
391 | 391 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | } |
426 | 426 | } |
427 | 427 | } |
428 | -EOT; |
|
428 | +eot; |
|
429 | 429 | |
430 | 430 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
431 | 431 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | } |
464 | 464 | } |
465 | 465 | } |
466 | -EOT; |
|
466 | +eot; |
|
467 | 467 | |
468 | 468 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
469 | 469 | |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | } |
499 | 499 | } |
500 | 500 | } |
501 | -EOT; |
|
501 | +eot; |
|
502 | 502 | |
503 | 503 | $this->client->request( |
504 | 504 | 'POST', |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | } |
542 | 542 | } |
543 | 543 | } |
544 | -EOT; |
|
544 | +eot; |
|
545 | 545 | |
546 | 546 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
547 | 547 |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use Behat\Mink\Driver\Selenium2Driver; |
17 | 17 | use Behat\Mink\Exception\ElementNotFoundException; |
18 | 18 | use FriendsOfBehat\PageObjectExtension\Page\SymfonyPage; |
19 | -use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException; |
|
20 | 19 | use Sylius\Behat\Service\JQueryHelper; |
21 | 20 | use Sylius\Component\Product\Model\ProductInterface; |
22 | 21 | use Sylius\Component\Product\Model\ProductOptionInterface; |