예제 #1
0
 /**
  * @return static
  */
 public function withOptionValues()
 {
     foreach ($this->entity->getOptionValues() as $optionValue) {
         $this->entityDTO->optionValues[] = $this->dtoBuilderFactory->getOptionValueDTOBuilder($optionValue)->withPrice()->build();
     }
     return $this;
 }
예제 #2
0
 public function testCreateDefaults()
 {
     $option = new Option();
     $this->assertSame(0, count($option->getTags()));
     $this->assertSame(0, count($option->getOptionProducts()));
     $this->assertSame(0, count($option->getOptionValues()));
     $this->assertTrue($option->getType()->isSelect());
 }