/**
  * @return static
  */
 public function withTags()
 {
     foreach ($this->entity->getTags() as $tag) {
         $this->entityDTO->tags[] = $this->dtoBuilderFactory->getTagDTOBuilder($tag)->build();
     }
     return $this;
 }
Пример #2
0
 public function testCreateDefaults()
 {
     $textOption = new TextOption();
     $this->assertSame(null, $textOption->getName());
     $this->assertSame(null, $textOption->getDescription());
     $this->assertSame(0, $textOption->getSortOrder());
     $this->assertSame(0, count($textOption->getTags()));
     $this->assertTrue($textOption->getType()->isText());
 }