public function testSetDbName() { $connection = new Connection($this->uri, $this->dbName); $connection->setDbName($dbName = 'mandango_testing'); $this->assertSame($dbName, $connection->getDbName()); $connection->getDatabase(); try { $connection->setDbName($this->dbName); $this->fail(); } catch (\Exception $e) { $this->assertInstanceOf('LogicException', $e); } }