diff --git a/tests/unit/ClientTest.php b/tests/unit/ClientTest.php index eee382698..609bb632d 100644 --- a/tests/unit/ClientTest.php +++ b/tests/unit/ClientTest.php @@ -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()); + } } \ No newline at end of file