public function setUp()
 {
     $this->influxDb = $this->getMockBuilder('InfluxDB\\Client')->setMethods([])->setConstructorArgs([''])->disableOriginalConstructor()->getMock();
     $this->client = new InfluxDbClient($this->influxDb, 'dbname');
     $logger = $this->getMock('\\Psr\\Log\\LoggerInterface');
     $this->client->setLogger($logger);
     parent::setUp();
 }
 /**
  * @param $host
  * @param $port
  * @param $user
  * @param $password
  * @param $databaseName
  * @return InfluxDbClient
  * @throws InfluxDB\Database\Exception
  */
 public function createInfluxDbClient($host, $port, $user, $password, $databaseName)
 {
     $influxDb = new InfluxDB\Client($host, $port, $user, $password);
     $connect = ['host' => $host, 'port' => $port, 'user' => $user, 'password' => $password];
     $this->logger->debug('Connect InfluxDB using: {user}:{password}@{host}:{port}', $connect);
     if (!$databaseName) {
         throw new \RuntimeException('InfluxDb database not defined');
     }
     $influxDbClient = new InfluxDbClient($influxDb, $databaseName);
     $influxDbClient->setLogger($this->logger);
     return $influxDbClient;
 }