public function testCreateDefaults() { $option = $this->dummyData->getOption(); $optionValue = new OptionValue($option); $this->assertSame(null, $optionValue->getSortOrder()); $this->assertSame(null, $optionValue->getSku()); $this->assertSame(null, $optionValue->getName()); $this->assertSame(null, $optionValue->getShippingWeight()); $this->assertSame($option, $optionValue->getOption()); $this->assertTrue($optionValue->getPrice() instanceof Price); }
/** * @return static */ public function withPrice() { $this->entityDTO->price = $this->dtoBuilderFactory->getPriceDTOBuilder($this->entity->getPrice())->build(); return $this; }