예제 #1
0
 /**
  * @Given /^there is product "([^"]+)" available in ((?:this|that|"[^"]+") channel)$/
  */
 public function thereIsProductAvailableInGivenChannel($productName, ChannelInterface $channel)
 {
     /** @var ProductInterface $product */
     $product = $this->productFactory->createNew();
     $product->setName($productName);
     $product->setPrice(0);
     $product->setDescription('Awesome ' . $productName);
     $product->addChannel($channel);
     $this->productRepository->add($product);
 }
예제 #2
0
 /**
  * @param ProductInterface $product
  */
 private function saveProduct(ProductInterface $product)
 {
     $this->productRepository->add($product);
     $this->sharedStorage->set('product', $product);
 }