1
0
Fork 0

Added test: create a database

Dieser Commit ist enthalten in:
DSB 2011-06-14 20:02:42 +00:00
Ursprung 6c0a5a0a2a
Commit cc1e1f30b6
3 geänderte Dateien mit 21 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -51,4 +51,25 @@ class Msd_Application_Controller_SqlControllerTest
$expected = 'Datensätze der Tabelle `mysql`.`columns_priv`';
$this->assertQueryContentContains('h2', $expected);
}
public function testCanCreateADatabase()
{
$this->loginUser();
//drop our testDb if it exists
$db = Msd_Db::getAdapter();
$db->query('DROP DATABASE IF EXISTS `testDb`');
$this->request->setMethod('POST');
$newDbInfo = array(
'dbName' => 'testDb',
'dbCharset' => 'utf8',
'dbCollation' => 'utf8_general_ci'
);
$this->request->setPost('newDbInfo', $newDbInfo);
$this->dispatch('sql/create.database');
$expected = 'Die Datenbank \'testDb\' wurde erfolgreich erstellt.';
$this->assertQueryContentContains('div', $expected);
// clean up
$db->query('DROP DATABASE IF EXISTS `testDb`');
}
}