Пример #1
0
 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 withOption()
 {
     $this->entityDTO->option = $this->dtoBuilderFactory->getOptionDTOBuilder($this->entity->getOption())->build();
     return $this;
 }