test-database setup in dbx_test.p.
--TEST--
dbx_connect
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
$nonexisting_database="nonexisting_database";
$nonexisting_username="nonexisting_username";
$nonexisting_password="nonexisting_password";
--TEST--
dbx_close
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
$dlo = dbx_connect($module, $host, $database, $username, $password);
if ($dlo!=0) {
if (dbx_close($dlo)) {
--TEST--
dbx_query
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
$sql_statement = "select * from tbl order by id";
$invalid_sql_statement = "invalid select * from tbl";
$sql_select_statement = "select * from tbl where id=999999 and parentid=999999";
--TEST--
dbx_error
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
if ($module==DBX_ODBC) {
// ODBC module doesn't have an error-message-function (yet?)
print('query generated an error: dbx_error works ok'."\n");
--TEST--
dbx_sort
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
$sql_statement = "select id, description from tbl where parentid=1 order by id";
$compare_function = "cmp";
$invalid_compare_function = "invalid_cmp";
--TEST--
dbx_compare
--SKIPIF--
-<?php if (!extension_loaded("dbx")) print("skip"); ?>
+<?php
+ if (!extension_loaded("dbx")) print("skip");
+ else {
+ include_once("dbx_test.p");
+ if ($connection===NULL) print("skip");
+ }
+?>
--POST--
--GET--
--FILE--
<?php
-include_once("ext/dbx/tests/dbx_test.p");
+include_once("dbx_test.p");
$sql_statement = "select id, description from tbl where parentid=1 order by id";
$compare_function_1 = "cmp_description_id";
$compare_function_2 = "cmp_description_desc_id";
<?php
-$connection = DBX_SYBASECT;
+// set the $connection to match your test-database setup
+// (possibly change the rest of the settings too)
+// e.g. $connection = DBX_MYSQL;
+$connection = NULL;
switch ($connection) {
case DBX_MYSQL:
$module=DBX_MYSQL;