public function __construct(Attribute $attribute, DTOBuilderFactoryInterface $dtoBuilderFactory) { $this->entity = $attribute; $this->dtoBuilderFactory = $dtoBuilderFactory; $this->entityDTO = new AttributeDTO(); $this->setId(); $this->setTime(); $this->entityDTO->name = $this->entity->getName(); $this->entityDTO->description = $this->entity->getDescription(); $this->entityDTO->sortOrder = $this->entity->getSortOrder(); }
public function testCreateDefaults() { $attribute = new Attribute(); $this->assertSame(null, $attribute->getName()); $this->assertSame(null, $attribute->getDescription()); $this->assertSame(null, $attribute->getSortOrder()); $this->assertSame(0, count($attribute->getAttributeValues())); }