summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/connect.inc
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2006-09-26 13:06:13 +0000
committerGeorg Richter <georg@php.net>2006-09-26 13:06:13 +0000
commit1432e7b40f08515d95b035fe47daeb39aaee3197 (patch)
tree88445bf63ab26557ee57c1e4db6228f570c42b41 /ext/mysqli/tests/connect.inc
parent798d93c4daa3f417314e1107124bc820ae73bdfc (diff)
downloadphp-git-1432e7b40f08515d95b035fe47daeb39aaee3197.tar.gz
added unicode support for mysqli extension
Diffstat (limited to 'ext/mysqli/tests/connect.inc')
-rw-r--r--ext/mysqli/tests/connect.inc26
1 files changed, 8 insertions, 18 deletions
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index b6cea2632b..16462a1bbd 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -1,24 +1,14 @@
<?php
/* default values are localhost, root and empty password
- Change the values if you use another configuration */
+ Change the MYSQL_TEST environment values if you want to
+ use another configuration */
$driver = new mysqli_driver;
- if (!$driver->embedded) {
- $host = "localhost";
- $user = "root";
- $passwd = "";
- } else {
- $path = dirname(__FILE__);
- $host = $user = $passwd = NULL;
- $args = array(
- "--datadir=$path",
- "--innodb_data_home_dir=$path",
- "--innodb_data_file_path=ibdata1:10M:autoextend",
- "--log-error=$path/testrun.log",
- "--init-connect='CREATE DATABASE IF NOT EXISTS test;'"
- );
- $driver->embedded_server_start(TRUE, $args, NULL);
- }
-
+ $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost";
+ $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3306;
+ $user = getenv("MYSQL_TEST_USER") ? getenv("MYSQL_TEST_USER") : "root";
+ $passwd = getenv("MYSQL_TEST_PASSWD") ? getenv("MYSQL_TEST_PASSWD") : "";
+ $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "phptest";
+ $engine = getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM";
?>