/** * @return static */ public function withOptionValues() { foreach ($this->entity->getOptionValues() as $optionValue) { $this->entityDTO->optionValues[] = $this->dtoBuilderFactory->getOptionValueDTOBuilder($optionValue)->withPrice()->build(); } return $this; }
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()); }