diff options
author | Christopher Jones <sixd@php.net> | 2011-11-09 06:19:07 +0000 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2011-11-09 06:19:07 +0000 |
commit | 14378908723ca045b9c04ebefdb0a1ade9687e69 (patch) | |
tree | 2a2e8d325b06426e391686f1244880f6045fb149 /ext/oci8 | |
parent | 152aaba03f46b4e6fd968b0eec1cc62cf77557f7 (diff) | |
download | php-git-14378908723ca045b9c04ebefdb0a1ade9687e69.tar.gz |
Add tests for unsupported types
Diffstat (limited to 'ext/oci8')
-rw-r--r-- | ext/oci8/package.xml | 5 | ||||
-rw-r--r-- | ext/oci8/tests/array_bind_bdouble.phpt | 21 | ||||
-rw-r--r-- | ext/oci8/tests/array_bind_bfloat.phpt | 21 | ||||
-rw-r--r-- | ext/oci8/tests/array_bind_uin.phpt | 21 |
4 files changed, 67 insertions, 1 deletions
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 526336f85f..f086869dea 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -33,7 +33,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> <active>no</active> </lead> - <date>2011-11-03</date> + <date>2011-11-08</date> <time>12:00:00</time> <version> @@ -66,6 +66,8 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="array_bind_012.phpt" role="test" /> <file name="array_bind_013.phpt" role="test" /> <file name="array_bind_014.phpt" role="test" /> + <file name="array_bind_bdouble.phpt" role="test" /> + <file name="array_bind_bfloat.phpt" role="test" /> <file name="array_bind_date1.phpt" role="test" /> <file name="array_bind_date.phpt" role="test" /> <file name="array_bind_float1.phpt" role="test" /> @@ -74,6 +76,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="array_bind_int.phpt" role="test" /> <file name="array_bind_str1.phpt" role="test" /> <file name="array_bind_str.phpt" role="test" /> + <file name="array_bind_uin.phpt" role="test" /> <file name="b47243_1.phpt" role="test" /> <file name="b47243_2.phpt" role="test" /> <file name="b47243_3.phpt" role="test" /> diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt new file mode 100644 index 0000000000..1bb95b2365 --- /dev/null +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BDOUBLE); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 22 in %sarray_bind_bdouble.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt new file mode 100644 index 0000000000..0b8fad6e60 --- /dev/null +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BFLOAT); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 21 in %sarray_bind_bfloat.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt new file mode 100644 index 0000000000..3ce039e0d0 --- /dev/null +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_UIN +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_UIN); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 68 in %sarray_bind_uin.php on line %d +Done |