/**
  * @Given the store has a product option :productOptionName with a code :productOptionCode
  */
 public function theStoreHasAProductOptionWithACode($productOptionName, $productOptionCode)
 {
     $productOption = $this->productOptionFactory->createNew();
     $productOption->setCode($productOptionCode);
     $productOption->setName($productOptionName);
     $this->sharedStorage->set('product_option', $productOption);
     $this->productOptionRepository->add($productOption);
 }
 /**
  * @Transform /^product option "([^"]+)"$/
  * @Transform /^"([^"]+)" option$/
  * @Transform :productOption
  */
 public function getProductOptionByName($productOptionName)
 {
     $productOptions = $this->productOptionRepository->findByName($productOptionName, 'en_US');
     Assert::eq(1, count($productOptions), sprintf('%d product options has been found with name "%s".', count($productOptions), $productOptionName));
     return $productOptions[0];
 }