'root', 'host' => '127.0.0.1', 'password' => '']; } if (isset($config['socket'])) { $CONF['database_socket'] = $config['socket']; Config::write('database_socket', $config['socket']); } else { $CONF['database_host'] = $config['host']; Config::write('database_host', $config['host']); } $CONF['database_type'] = 'mysql'; $CONF['database_user'] = $config['user']; $CONF['database_password'] = $config['password']; $CONF['database_name'] = 'postfixadmin'; Config::write('database_type', 'mysql'); Config::write('database_user', $config['user']); Config::write('database_password', $config['password']); Config::write('database_name', 'postfixadmin'); echo "Using: MySQL database for tests\n"; } try { $db = db_connect(); } catch (Exception $e) { echo "failed to connect to database\n"; echo $e->getMessage(); exit(1); } require_once(dirname(__FILE__) . '/../public/upgrade.php');