/** * @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); }