/**
  * @return static
  */
 private function withTag()
 {
     $tag = $this->entity->getTag();
     if ($tag !== null) {
         $this->entityDTO->tag = $this->dtoBuilderFactory->getTagDTOBuilder($tag)->build();
     }
     return $this;
 }
Ejemplo n.º 2
0
 public function testCreateDefaults()
 {
     $catalogPromotion = new CatalogPromotion();
     $this->assertTrue($catalogPromotion->getId() instanceof UuidInterface);
     $this->assertTrue($catalogPromotion->getCreated() instanceof DateTime);
     $this->assertSame('d', $catalogPromotion->getCode());
     $this->assertSame(null, $catalogPromotion->getTag());
 }