summaryrefslogtreecommitdiff
path: root/tests/sql/connect.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sql/connect.inc')
-rw-r--r--tests/sql/connect.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/sql/connect.inc b/tests/sql/connect.inc
new file mode 100644
index 0000000..367d63d
--- /dev/null
+++ b/tests/sql/connect.inc
@@ -0,0 +1,14 @@
1<?php
2
3 $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost";
4 $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3306;
5 $user = getenv("MYSQL_TEST_USER") ? getenv("MYSQL_TEST_USER") : "root";
6 $passwd = getenv("MYSQL_TEST_PASSWD") ? getenv("MYSQL_TEST_PASSWD") : "";
7 $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "test";
8 $socket = getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null;
9
10 function connect_mysqli_oostyle() {
11 global $host, $port, $user, $passwd, $db, $socket;
12 return new mysqli($host, $user, $passwd, $db, $port, $socket);
13 }
14?> \ No newline at end of file