diff options
author | Marc Boeren <mboeren@php.net> | 2002-02-18 09:21:51 +0000 |
---|---|---|
committer | Marc Boeren <mboeren@php.net> | 2002-02-18 09:21:51 +0000 |
commit | cb46dbb6ebe92c102636dd7018deab768a88f499 (patch) | |
tree | 6bfdc214b2f04d6820616a411a2f7eb6a5032631 /ext/dbx/tests | |
parent | ede90c86fa795aebee29eb68807cb08a3f6193b2 (diff) | |
download | php-git-cb46dbb6ebe92c102636dd7018deab768a88f499.tar.gz |
Added support for Sybase-CT to dbx module (Mc).
Diffstat (limited to 'ext/dbx/tests')
-rw-r--r-- | ext/dbx/tests/002.phpt | 1 | ||||
-rw-r--r-- | ext/dbx/tests/005.phpt | 5 | ||||
-rw-r--r-- | ext/dbx/tests/006.phpt | 6 | ||||
-rw-r--r-- | ext/dbx/tests/dbx_test.p | 10 |
4 files changed, 17 insertions, 5 deletions
diff --git a/ext/dbx/tests/002.phpt b/ext/dbx/tests/002.phpt index 78201a4ff6..f9dff86155 100644 --- a/ext/dbx/tests/002.phpt +++ b/ext/dbx/tests/002.phpt @@ -12,6 +12,7 @@ if (DBX_PGSQL=="DBX_PGSQL") print('!DBX_PGSQL'); if (DBX_MSSQL=="DBX_MSSQL") print('!DBX_MSSQL'); if (DBX_FBSQL=="DBX_FBSQL") print('!DBX_FBSQL'); if (DBX_OCI8=="DBX_OCI8") print('!DBX_OCI8'); +if (DBX_SYBASECT=="DBX_SYBASECT") print('!DBX_SYBASECT'); if (DBX_PERSISTENT=="DBX_PERSISTENT") print('!DBX_PERSISTENT'); if (DBX_RESULT_INFO=="DBX_RESULT_INFO") print('!DBX_RESULT_INFO'); if (DBX_RESULT_INDEX=="DBX_RESULT_INDEX") print('!DBX_RESULT_INDEX'); diff --git a/ext/dbx/tests/005.phpt b/ext/dbx/tests/005.phpt index 4ee7f7c5a7..447fb3625c 100644 --- a/ext/dbx/tests/005.phpt +++ b/ext/dbx/tests/005.phpt @@ -18,6 +18,9 @@ if (!$dlo) { print('this won\'t work'."\n"); } else { + // especially for sybase I need to set the textsize to >64 k, as one of the test-fields + // requires this (shouldn't this be a php.ini-entry??) + if ($connection === DBX_SYBASECT) @dbx_query($dlo, "set textsize 100000"); // select query if ($dro=dbx_query($dlo, $sql_statement)) { for ($i=0; $i<$dro->rows; ++$i) { @@ -87,4 +90,4 @@ delete-query: dbx_query works ok wrong dbx_link_object: query failure works ok wrong sql-statement: query failure works ok too many parameters: query failure works ok -too few parameters: query failure works ok
\ No newline at end of file +too few parameters: query failure works ok diff --git a/ext/dbx/tests/006.phpt b/ext/dbx/tests/006.phpt index cfe1e48b97..b4f29b51f8 100644 --- a/ext/dbx/tests/006.phpt +++ b/ext/dbx/tests/006.phpt @@ -25,12 +25,12 @@ if (!$dlo) { } else { @dbx_query($dlo, "select nonexistingfield from tbl"); - if (($module==DBX_MSSQL && dbx_error($dlo)!="Changed database context to '".$database."'.") + if ((($module==DBX_MSSQL || $module==DBX_SYBASECT) && dbx_error($dlo)!="Changed database context to '".$database."'.".($module==DBX_SYBASECT?"\n":"")) || strlen(dbx_error($dlo))) { print('query generated an error: dbx_error works ok'."\n"); } dbx_query($dlo, "select description from tbl"); - if (!strlen(dbx_error($dlo)) || ($module==DBX_MSSQL && dbx_error($dlo)=="Changed database context to '".$database."'.")) { + if (!strlen(dbx_error($dlo)) || (($module==DBX_MSSQL || $module==DBX_SYBASECT) && dbx_error($dlo)=="Changed database context to '".$database."'.".($module==DBX_SYBASECT?"\n":""))) { print('query is valid: dbx_error works ok'."\n"); } if (!@dbx_error(0)) { @@ -52,4 +52,4 @@ query generated an error: dbx_error works ok query is valid: dbx_error works ok wrong dbx_link_object: dbx_error failure works ok too many parameters: dbx_error failure works ok -too few parameters: dbx_error failure works ok
\ No newline at end of file +too few parameters: dbx_error failure works ok diff --git a/ext/dbx/tests/dbx_test.p b/ext/dbx/tests/dbx_test.p index b7a7bc5027..79418b20e0 100644 --- a/ext/dbx/tests/dbx_test.p +++ b/ext/dbx/tests/dbx_test.p @@ -1,5 +1,5 @@ <?php -$connection = DBX_MYSQL; +$connection = DBX_SYBASECT; switch ($connection) { case DBX_MYSQL: $module=DBX_MYSQL; @@ -49,6 +49,14 @@ switch ($connection) { $password="dbx_testpassword"; $module_name="oci8"; break; + case DBX_SYBASECT: + $module=DBX_SYBASECT; + $host="threesyb"; + $database="dbx_test"; + $username="dbx_testuser"; + $password="dbx_testpassword"; + $module_name="sybase_ct"; + break; } ?>
\ No newline at end of file |