/** * @return static */ public function withTags() { foreach ($this->entity->getTags() as $tag) { $this->entityDTO->tags[] = $this->dtoBuilderFactory->getTagDTOBuilder($tag)->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()); }