|
@@ 46-54 (lines=9) @@
|
| 43 |
|
/** |
| 44 |
|
* @Given the store has product block :name |
| 45 |
|
*/ |
| 46 |
|
public function theStoreHasProductBlock($name) |
| 47 |
|
{ |
| 48 |
|
$productBlock = $this->productBlockExampleFactory->create(['name' => $name]); |
| 49 |
|
|
| 50 |
|
$this->productBlockManager->persist($productBlock); |
| 51 |
|
$this->productBlockManager->flush(); |
| 52 |
|
|
| 53 |
|
$this->sharedStorage->set('product_block', $productBlock); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
/** |
| 57 |
|
* @Given /^the store has product block "([^"]+)" with (body|title|link) "([^"]+)"$/ |
|
@@ 59-67 (lines=9) @@
|
| 56 |
|
/** |
| 57 |
|
* @Given /^the store has product block "([^"]+)" with (body|title|link) "([^"]+)"$/ |
| 58 |
|
*/ |
| 59 |
|
public function theStoreHasProductBlockWithField($name, $field, $value) |
| 60 |
|
{ |
| 61 |
|
$productBlock = $this->productBlockExampleFactory->create(['name' => $name, $field => $value]); |
| 62 |
|
|
| 63 |
|
$this->productBlockManager->persist($productBlock); |
| 64 |
|
$this->productBlockManager->flush(); |
| 65 |
|
|
| 66 |
|
$this->sharedStorage->set('product_block', $productBlock); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
/** |
| 70 |
|
* @Given /^the store has product block "([^"]+)" with (product "[^"]+")$/ |
|
@@ 72-80 (lines=9) @@
|
| 69 |
|
/** |
| 70 |
|
* @Given /^the store has product block "([^"]+)" with (product "[^"]+")$/ |
| 71 |
|
*/ |
| 72 |
|
public function theStoreHasProductBlockWithProduct($name, ProductInterface $product) |
| 73 |
|
{ |
| 74 |
|
$productBlock = $this->productBlockExampleFactory->create(['name' => $name, 'product' => $product]); |
| 75 |
|
|
| 76 |
|
$this->productBlockManager->persist($productBlock); |
| 77 |
|
$this->productBlockManager->flush(); |
| 78 |
|
|
| 79 |
|
$this->sharedStorage->set('product_block', $productBlock); |
| 80 |
|
} |
| 81 |
|
} |
| 82 |
|
|