From: Felipe Pena Date: Thu, 14 May 2009 01:29:37 +0000 (+0000) Subject: - New tests X-Git-Tag: php-5.2.10RC1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00a0efa5a2e75449efc760ceba4c1d81aa412fd0;p=php - New tests --- diff --git a/ext/odbc/tests/odbc_columnprivileges_001.phpt b/ext/odbc/tests/odbc_columnprivileges_001.phpt new file mode 100644 index 0000000000..062985d55f --- /dev/null +++ b/ext/odbc/tests/odbc_columnprivileges_001.phpt @@ -0,0 +1,28 @@ +--TEST-- +odbc_columnprivileges(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (odbc result) +bool(false) +resource(%d) of type (odbc result) +bool(false) +resource(%d) of type (odbc result) +bool(false) diff --git a/ext/odbc/tests/odbc_columns_001.phpt b/ext/odbc/tests/odbc_columns_001.phpt new file mode 100644 index 0000000000..f6da78e8e7 --- /dev/null +++ b/ext/odbc/tests/odbc_columns_001.phpt @@ -0,0 +1,32 @@ +--TEST-- +odbc_columns(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (odbc result) +bool(false) +resource(%d) of type (odbc result) +bool(false) + +Warning: odbc_columns(): SQL error: Failed to fetch error message, SQL state HY000 in SQLColumns in %s on line %d +bool(false) + +Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given in %s on line %d +NULL diff --git a/ext/odbc/tests/odbc_data_source_001.phpt b/ext/odbc/tests/odbc_data_source_001.phpt new file mode 100644 index 0000000000..17a826f0d0 --- /dev/null +++ b/ext/odbc/tests/odbc_data_source_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +odbc_data_source(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d +bool(false) + +Warning: odbc_data_source() expects parameter 2 to be long, string given in %s on line %d +NULL +array(%d) { +%a +} diff --git a/ext/odbc/tests/odbc_exec_002.phpt b/ext/odbc/tests/odbc_exec_002.phpt new file mode 100644 index 0000000000..8f9672df50 --- /dev/null +++ b/ext/odbc/tests/odbc_exec_002.phpt @@ -0,0 +1,36 @@ +--TEST-- +odbc_exec(): Getting data from query +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +string(1) "1" +array(1) { + ["TEST"]=> + string(1) "2" +} diff --git a/ext/odbc/tests/odbc_free_result_001.phpt b/ext/odbc/tests/odbc_free_result_001.phpt new file mode 100644 index 0000000000..4fcd5cda2c --- /dev/null +++ b/ext/odbc/tests/odbc_free_result_001.phpt @@ -0,0 +1,50 @@ +--TEST-- +odbc_free_result(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +string(1) "1" +bool(true) + +Warning: odbc_free_result(): supplied resource is not a valid ODBC result resource in %s on line %d +bool(false) + +Warning: odbc_free_result() expects parameter 1 to be resource, null given in %s on line %d +NULL + +Warning: odbc_fetch_row(): %d is not a valid ODBC result resource in %s on line %d +bool(false) + +Warning: odbc_result(): %d is not a valid ODBC result resource in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_tables_001.phpt b/ext/odbc/tests/odbc_tables_001.phpt new file mode 100644 index 0000000000..6b922f25e6 --- /dev/null +++ b/ext/odbc/tests/odbc_tables_001.phpt @@ -0,0 +1,29 @@ +--TEST-- +odbc_tables(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (odbc result) +bool(false) +resource(%d) of type (odbc result) +bool(false) +resource(%d) of type (odbc result) +bool(false)