From: Antony Dovgal Date: Wed, 31 Jan 2007 13:56:16 +0000 (+0000) Subject: MFH: improve tests X-Git-Tag: php-5.2.1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cdaff68610cb4816723d692402d0f084d131a85a;p=php MFH: improve tests --- diff --git a/ext/oci8/tests/bind_empty.phpt b/ext/oci8/tests/bind_empty.phpt index 9c602b32c3..ba50f86175 100644 --- a/ext/oci8/tests/bind_empty.phpt +++ b/ext/oci8/tests/bind_empty.phpt @@ -4,7 +4,7 @@ binding empty values --FILE-- --EXPECTF-- +Test 1 +bool(true) +Test 2 +bool(true) +Test 3 +bool(true) +array(1) { + ["NAME"]=> + array(2) { + [0]=> + string(3) "def" + [1]=> + NULL + } +} +Test 4 +bool(true) +array(1) { + ["NAME"]=> + array(2) { + [0]=> + NULL + [1]=> + NULL + } +} Done diff --git a/ext/oci8/tests/oci_execute_segfault.phpt b/ext/oci8/tests/oci_execute_segfault.phpt index 3859f4ffe0..9ba7d770fd 100644 --- a/ext/oci8/tests/oci_execute_segfault.phpt +++ b/ext/oci8/tests/oci_execute_segfault.phpt @@ -1,30 +1,48 @@ --TEST-- -oci_execute() segfault after repeated bind +oci_execute() segfault after repeated bind of LOB descriptor --SKIPIF-- --FILE-- save("some binary data")); + +oci_bind_by_name($s, ":v_blob", $blob, -1, OCI_B_BLOB); +oci_execute($s, OCI_DEFAULT); +var_dump($blob->save("some more binary data")); + +$query = 'SELECT blob, DBMS_LOB.GETLENGTH(blob) FROM '.$schema.$table_name.' ORDER BY 2'; + +$s = oci_parse ($c, $query); +oci_execute($s, OCI_DEFAULT); + +while ($arr = oci_fetch_assoc($s)) { + $result = $arr['BLOB']->load(); + var_dump($result); +} -oci_bind_by_name($s,":v_blob", $blob,-1,OCI_B_BLOB); -oci_execute($s); +require dirname(__FILE__).'/drop_table.inc'; echo "Done\n"; ?> --EXPECT-- +bool(true) +bool(true) +string(16) "some binary data" +string(21) "some more binary data" Done