/**
* testReadTableParameters method
*
* @access public
* @return void
*/
function testReadTableParameters()
{
$this->Dbo->cacheSources = $this->Dbo->testing = false;
$tableName = 'tinyint_' . uniqid();
$this->Dbo->rawQuery('CREATE TABLE ' . $this->Dbo->fullTableName($tableName) . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;');
$result = $this->Dbo->readTableParameters($tableName);
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
$expected = array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB');
$this->assertEqual($result, $expected);
$this->Dbo->rawQuery('CREATE TABLE ' . $this->Dbo->fullTableName($tableName) . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_general_ci;');
$result = $this->Dbo->readTableParameters($tableName);
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
$expected = array('charset' => 'cp1250', 'collate' => 'cp1250_general_ci', 'engine' => 'MyISAM');
$this->assertEqual($result, $expected);
}