コード例 #1
0
ファイル: PromotionContext.php プロジェクト: loic425/Sylius
 /**
  * @Given /^([^"]+) gives ("(?:€|£|\$)[^"]+") off if order contains (?:a|an) ("[^"]+" product)$/
  */
 public function thePromotionGivesOffIfOrderContainsProducts(PromotionInterface $promotion, $discount, ProductInterface $product)
 {
     $rule = $this->ruleFactory->createContainsProduct($product->getCode());
     $this->createFixedPromotion($promotion, $discount, [], $rule);
 }