diff options
Diffstat (limited to 'ext/mysqli/tests/connect.inc')
| -rw-r--r-- | ext/mysqli/tests/connect.inc | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 8b86355564..5db701d93b 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -1,11 +1,11 @@ <?php - /* - Default values are "localhost", "root", - database "phptest" and empty password. - Change the MYSQL_TEST environment values - if you want to use another configuration - */ - + /* + Default values are "localhost", "root", + database "phptest" and empty password. + Change the MYSQL_TEST environment values + if you want to use another configuration + */ + $driver = new mysqli_driver; $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost"; @@ -15,40 +15,40 @@ $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "phptest"; $engine = getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket = getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; - + /* Development setting: test experimal features and/or feature requests that never worked before? */ - $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? - ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : - false; + $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? + ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : + false; $IS_MYSQLND = stristr(mysqli_get_client_info(), "mysqlnd"); if (!$IS_MYSQLND) { - $MYSQLND_VERSION = NULL; + $MYSQLND_VERSION = NULL; } else { - if (preg_match('@Revision:\s+(\d+)\s*\$@ism', mysqli_get_client_info(), $matches)) { - $MYSQLND_VERSION = (int)$matches[1]; - } else { - $MYSQLND_VERSION = -1; - } + if (preg_match('@Revision:\s+(\d+)\s*\$@ism', mysqli_get_client_info(), $matches)) { + $MYSQLND_VERSION = (int)$matches[1]; + } else { + $MYSQLND_VERSION = -1; + } } - if (!function_exists('sys_get_temp_dir')) { - function sys_get_temp_dir() { - - if (!empty($_ENV['TMP'])) - return realpath( $_ENV['TMP'] ); - if (!empty($_ENV['TMPDIR'])) - return realpath( $_ENV['TMPDIR'] ); - if (!empty($_ENV['TEMP'])) - return realpath( $_ENV['TEMP'] ); - - $temp_file = tempnam(md5(uniqid(rand(), TRUE)), ''); - if ($temp_file) { - $temp_dir = realpath(dirname($temp_file)); - unlink($temp_file); - return $temp_dir; - } - return FALSE; - } - } + if (!function_exists('sys_get_temp_dir')) { + function sys_get_temp_dir() { + + if (!empty($_ENV['TMP'])) + return realpath( $_ENV['TMP'] ); + if (!empty($_ENV['TMPDIR'])) + return realpath( $_ENV['TMPDIR'] ); + if (!empty($_ENV['TEMP'])) + return realpath( $_ENV['TEMP'] ); + + $temp_file = tempnam(md5(uniqid(rand(), TRUE)), ''); + if ($temp_file) { + $temp_dir = realpath(dirname($temp_file)); + unlink($temp_file); + return $temp_dir; + } + return FALSE; + } + } ?>
\ No newline at end of file |
