public function setUp()
 {
     $options = new Options();
     $options->setHost("localhost");
     $options->setPort(8086);
     $options->setUsername("root");
     $options->setPassword("root");
     $options->setDatabase("tcp.test");
     $client = new Client(new GuzzleAdapter(new HttpClient(), $options));
     $client->createDatabase("tcp.test");
     $client->createDatabase("udp.test");
     $this->httpClient = $client;
     $opts = new Options();
     $opts->setPort(4444);
     $client = new Client(new UdpAdapter($opts));
     $this->udpClient = $client;
 }
Example #2
0
 public function testDropExistingDatabase()
 {
     $options = new Options();
     $guzzleHttp = new GuzzleHttpClient();
     $adapter = new InfluxHttpAdapter($guzzleHttp, $options);
     $client = new Client($adapter);
     $client->createDatabase("walter");
     $this->assertDatabasesCount(3);
     $client->deleteDatabase("walter");
     $this->assertDatabasesCount(2);
 }