public function selectDatabase($database)
{
$mysqli = $this->_mysqli();
if (!$mysqli->select_db($database)) {
throw new Exception($mysqli->error, $mysqli->errno);
}
$this->_selectedDatabase = $database;
return $this;
}
public function testSelectNonexistantDatabaseFails() { $dsn = $this->dsn->copy(array('database' => '')); $conn = new Mysqli\Connection($dsn); $this->setExpectedException('\\Pheasant\\Database\\Mysqli\\Exception'); $conn->selectDatabase('llamassddfasdfsdfsdf'); }