Sylius\Behat\Context\Setup\PromotionContext::thereIsAPromotionWithPriority PHP Method

thereIsAPromotionWithPriority() public method

public thereIsAPromotionWithPriority ( $promotionName, $priority )
    public function thereIsAPromotionWithPriority($promotionName, $priority)
    {
        $promotion = $this->testPromotionFactory->createForChannel($promotionName, $this->sharedStorage->get('channel'));
        $promotion->setPriority($priority);
        $this->promotionRepository->add($promotion);
        $this->sharedStorage->set('promotion', $promotion);
    }
PromotionContext