From 4e010297f17b25b566c52e72f31a833d046a1b84 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 19 Nov 2009 17:44:46 +0000 Subject: [PATCH] New test --- ext/oci8/tests/fetch_object_2.phpt | 127 +++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 ext/oci8/tests/fetch_object_2.phpt 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=== -- 2.40.0