mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Add tests for unsupported types
This commit is contained in:
parent
152aaba03f
commit
1437890872
@ -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" />
|
||||
|
21
ext/oci8/tests/array_bind_bdouble.phpt
Normal file
21
ext/oci8/tests/array_bind_bdouble.phpt
Normal 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
|
21
ext/oci8/tests/array_bind_bfloat.phpt
Normal file
21
ext/oci8/tests/array_bind_bfloat.phpt
Normal 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
|
21
ext/oci8/tests/array_bind_uin.phpt
Normal file
21
ext/oci8/tests/array_bind_uin.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user