Add tests for unsupported types

This commit is contained in:
Christopher Jones 2011-11-09 06:19:07 +00:00
parent 152aaba03f
commit 1437890872
4 changed files with 67 additions and 1 deletions

View File

@ -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" />

View File

@ -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

View File

@ -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

View File

@ -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