From 211ba95392f97d00f0adf1866afb48a3df675f3c Mon Sep 17 00:00:00 2001 From: DSB Date: Tue, 14 Jun 2011 21:09:19 +0000 Subject: [PATCH] SQLController: - added test --- tests/functional/controllers/SqlControllerTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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