From: Christopher Jones Date: Thu, 19 Nov 2009 17:44:46 +0000 (+0000) Subject: New test X-Git-Tag: php-5.3.2RC1~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e010297f17b25b566c52e72f31a833d046a1b84;p=php New test --- diff --git a/ext/oci8/tests/fetch_object_2.phpt b/ext/oci8/tests/fetch_object_2.phpt new file mode 100644 index 0000000000..342503d911 --- /dev/null +++ b/ext/oci8/tests/fetch_object_2.phpt @@ -0,0 +1,127 @@ +--TEST-- +oci_fetch_object() with CLOB and NULL +--SKIPIF-- + +--FILE-- +COL1 . "\n"; + echo $row->COL2->load(100) . "\n"; + echo $row->COL3 . "\n"; +} + +// Clean up + +$stmtarray = array( + "drop table fetch_object_2_tab" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +?> +===DONE=== + +--EXPECTF-- +Test 1 +object(stdClass)#%d (3) { + [%u|b%"COL1"]=> + %unicode|string%(3) "123" + [%u|b%"COL2"]=> + object(OCI-Lob)#%d (1) { + [%u|b%"descriptor"]=> + resource(15) of type (oci8 descriptor) + } + [%u|b%"COL3"]=> + %unicode|string%(11) "1 more text" +} +object(stdClass)#%d (3) { + [%u|b%"COL1"]=> + %unicode|string%(3) "456" + [%u|b%"COL2"]=> + object(OCI-Lob)#%d (1) { + [%u|b%"descriptor"]=> + resource(16) of type (oci8 descriptor) + } + [%u|b%"COL3"]=> + NULL +} +object(stdClass)#%d (3) { + [%u|b%"COL1"]=> + %unicode|string%(3) "789" + [%u|b%"COL2"]=> + object(OCI-Lob)#%d (1) { + [%u|b%"descriptor"]=> + resource(17) of type (oci8 descriptor) + } + [%u|b%"COL3"]=> + %unicode|string%(11) "3 more text" +} +Test 2 +123 +1st row col2 string +1 more text +456 +2nd row col2 string + +789 +3rd row col2 string +3 more text +===DONE===