diff --git a/src/messenger/tests/server_side/webim/classes/DatabaseTest.php b/src/messenger/tests/server_side/webim/classes/DatabaseTest.php index ad05dfde..5d880c36 100644 --- a/src/messenger/tests/server_side/webim/classes/DatabaseTest.php +++ b/src/messenger/tests/server_side/webim/classes/DatabaseTest.php @@ -1,7 +1,7 @@ exec( "CREATE TABLE phpunit_test_only " . @@ -48,11 +48,11 @@ class DatabaseTest extends PHPUnit_Framework_TestCase { } public static function tearDownAfterClass() { - global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb; + global $db_host, $db_user, $db_pass, $db_name; $dbh = new PDO( - "mysql:host={$mysqlhost};dbname={$mysqldb}", - $mysqllogin, - $mysqlpass + "mysql:host={$db_host};dbname={$db_name}", + $db_user, + $db_pass ); $dbh->exec("DROP TABLE phpunit_test_only"); $dbh = NULL; diff --git a/src/messenger/tests/server_side/webim/classes/SettingsTest.php b/src/messenger/tests/server_side/webim/classes/SettingsTest.php index 8a21db9e..805d4f75 100644 --- a/src/messenger/tests/server_side/webim/classes/SettingsTest.php +++ b/src/messenger/tests/server_side/webim/classes/SettingsTest.php @@ -1,8 +1,8 @@ query( "INSERT INTO {chatconfig} (vckey, vcvalue) " . @@ -25,6 +37,7 @@ class SettingsTest extends PHPUnit_Framework_TestCase { "DELETE FROM {chatconfig} WHERE vckey = ? OR vckey = ?", array('some_test_key', 'some_another_test_key') ); + Database::destroy(); } public function testGet() { diff --git a/src/messenger/tests/server_side/webim/database_config.php b/src/messenger/tests/server_side/webim/database_config.php new file mode 100644 index 00000000..9f96231e --- /dev/null +++ b/src/messenger/tests/server_side/webim/database_config.php @@ -0,0 +1,13 @@ + \ No newline at end of file