PromotionDiscountCollection example


    public function testPromotionHasDiscountYes(): void
    {
        $discount = new PromotionDiscountEntity();
        $discount->setId('D1');

        $promotion = new PromotionEntity();
        $promotion->setDiscounts(new PromotionDiscountCollection([$discount]));

        static::assertTrue($promotion->hasDiscount());
    }
}
Home | Imprint | This part of the site doesn't use cookies.