public function testWritePoints() { $database = $this->getMock('InfluxDB\\Database', [], ['dbname', $this->influxDb]); $database->method('writePoints')->willReturn(true); $this->client->setDatabase($database); $this->client->writePoints([]); }