/** * @Given /^([^"]+) gives ("[^"]+%") off on every product (classified as "[^"]+") and a ("(?:€|£|\$)[^"]+") discount to every order with items total equal at least ("(?:€|£|\$)[^"]+")$/ */ public function itGivesOffOnEveryProductClassifiedAsAndAFixedDiscountToEveryOrderWithItemsTotalEqualAtLeast(PromotionInterface $promotion, $taxonDiscount, TaxonInterface $taxon, $orderDiscount, $targetAmount) { $orderDiscountAction = $this->actionFactory->createFixedDiscount($orderDiscount); $promotion->addAction($orderDiscountAction); $rule = $this->ruleFactory->createItemTotal($targetAmount); $this->createUnitPercentagePromotion($promotion, $taxonDiscount, $this->getTaxonFilterConfiguration([$taxon->getCode()]), $rule); }