Client tests

This commit is contained in:
danibrutal
2015-07-03 17:29:25 +02:00
parent a29f2e5134
commit f6be9bedb4

View File

@@ -18,4 +18,16 @@ class ClientTest extends \PHPUnit_Framework_TestCase
$client->getBaseURI(), 'http://localhost:8086'
);
}
public function testSelectDbShouldReturnDatabaseInstance()
{
$client = new Client('localhost', 8086);
$dbName = 'test-database';
$db = $client->selectDB($dbName);
$this->assertInstanceOf('\InfluxDB\Database', $db);
$this->assertEquals($dbName, $db->getName());
}
}