mboeren Mon Oct 7 05:27:03 2002 EDT Modified files: /php4/ext/dbx/tests 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt dbx_test.p Log: Tests will be skipped if a tester does not explicitly specify the test-database setup in dbx_test.p. Index: php4/ext/dbx/tests/003.phpt diff -u php4/ext/dbx/tests/003.phpt:1.3 php4/ext/dbx/tests/003.phpt:1.4 --- php4/ext/dbx/tests/003.phpt:1.3 Wed Jun 13 09:35:17 2001 +++ php4/ext/dbx/tests/003.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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"; Index: php4/ext/dbx/tests/004.phpt diff -u php4/ext/dbx/tests/004.phpt:1.1 php4/ext/dbx/tests/004.phpt:1.2 --- php4/ext/dbx/tests/004.phpt:1.1 Tue Jun 5 09:51:01 2001 +++ php4/ext/dbx/tests/004.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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)) { Index: php4/ext/dbx/tests/005.phpt diff -u php4/ext/dbx/tests/005.phpt:1.3 php4/ext/dbx/tests/005.phpt:1.4 --- php4/ext/dbx/tests/005.phpt:1.3 Mon Feb 18 04:21:51 2002 +++ php4/ext/dbx/tests/005.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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"; Index: php4/ext/dbx/tests/006.phpt diff -u php4/ext/dbx/tests/006.phpt:1.3 php4/ext/dbx/tests/006.phpt:1.4 --- php4/ext/dbx/tests/006.phpt:1.3 Mon Feb 18 04:21:51 2002 +++ php4/ext/dbx/tests/006.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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"); Index: php4/ext/dbx/tests/007.phpt diff -u php4/ext/dbx/tests/007.phpt:1.1 php4/ext/dbx/tests/007.phpt:1.2 --- php4/ext/dbx/tests/007.phpt:1.1 Tue Jun 5 09:51:01 2001 +++ php4/ext/dbx/tests/007.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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"; Index: php4/ext/dbx/tests/008.phpt diff -u php4/ext/dbx/tests/008.phpt:1.1 php4/ext/dbx/tests/008.phpt:1.2 --- php4/ext/dbx/tests/008.phpt:1.1 Tue Jun 5 09:51:01 2001 +++ php4/ext/dbx/tests/008.phpt Mon Oct 7 05:27:02 2002 @@ -1,12 +1,18 @@ --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"; Index: php4/ext/dbx/tests/dbx_test.p diff -u php4/ext/dbx/tests/dbx_test.p:1.6 php4/ext/dbx/tests/dbx_test.p:1.7 --- php4/ext/dbx/tests/dbx_test.p:1.6 Mon Feb 18 04:21:51 2002 +++ php4/ext/dbx/tests/dbx_test.p Mon Oct 7 05:27:02 2002 @@ -1,5 +1,8 @@ <?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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php