public function testCreate() { $pricing = $this->dummyData->getPricing(); $this->productQuantityDiscount->setCustomerGroup(null); $this->productQuantityDiscount->setQuantity(6); $this->productQuantityDiscount->setFlagApplyCatalogPromotions(true); $this->assertEntityValid($this->productQuantityDiscount); $this->assertSame(null, $this->productQuantityDiscount->getCustomerGroup()); $this->assertSame(6, $this->productQuantityDiscount->getQuantity()); $this->assertSame(true, $this->productQuantityDiscount->getFlagApplyCatalogPromotions()); $this->assertSame($this->product, $this->productQuantityDiscount->getProduct()); $this->assertTrue($this->productQuantityDiscount->getPrice($pricing) instanceof Price); }
/** * @return static */ public function withPrice(PricingInterface $pricing) { $this->entityDTO->price = $this->dtoBuilderFactory->getPriceDTOBuilder($this->entity->getPrice($pricing))->withAllData()->build(); return $this; }