public function __construct(Warehouse $warehouse, DTOBuilderFactoryInterface $dtoBuilderFactory) { $this->entity = $warehouse; $this->dtoBuilderFactory = $dtoBuilderFactory; $this->entityDTO = new WarehouseDTO(); $this->setId(); $this->setTime(); $this->entityDTO->name = $this->entity->getName(); $this->entityDTO->address = $this->dtoBuilderFactory->getAddressDTOBuilder($this->entity->getAddress())->build(); }
public function testCreateDefaults() { $warehouse = new Warehouse(); $this->assertSame(null, $warehouse->getName()); $this->assertSame(null, $warehouse->getAddress()); }