/** * @return static */ private function withTag() { $tag = $this->entity->getTag(); if ($tag !== null) { $this->entityDTO->tag = $this->dtoBuilderFactory->getTagDTOBuilder($tag)->build(); } return $this; }
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()); }