'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_pass'] = $config['password']; $CONF['database_name'] = 'postfixadmin'; Config::write('database_type', 'mysql'); Config::write('database_user', $config['user']); Config::write('database_pass', $config['password']); Config::write('database_name', 'postfixadmin'); echo "Using: MySQL database for tests\n"; } list($db, $error_text) = db_connect_with_errors(); if ($db === false) { echo "failed to connect to database\n"; echo $error_text; exit(1); } require_once(dirname(__FILE__) . '/../public/upgrade.php');