diff --git a/tests/functional/controllers/SqlControllerTest.php b/tests/functional/controllers/SqlControllerTest.php index b08106e..b2e82ae 100644 --- a/tests/functional/controllers/SqlControllerTest.php +++ b/tests/functional/controllers/SqlControllerTest.php @@ -98,4 +98,15 @@ class Msd_Application_Controller_SqlControllerTest // look for the "ok" icon $this->assertQueryContentContains('td', '/css/msd/icons/16x16/Apply.png'); } + + public function testShowDatabasesCanFallbackOnInvalidActualDatabase() + { + $this->loginUser(); + $config = Msd_Configuration::getInstance(); + $config->set('dynamic.dbActual', 'IDontExist'); + $this->dispatch('sql/show.databases'); + // make sure we fall back to first db "information_schema" + $expected = ''; + $this->assertQueryContentContains('select', $expected); + } } \ No newline at end of file