From 0e3b847fe2b68a8d54540f99895777af33362c70 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 12 Dec 2006 09:33:17 +0000 Subject: [PATCH] add new tests --- ext/oci8/tests/lob_028.phpt | 122 ++++++++++++++++++++++++++++++++++++ ext/oci8/tests/lob_029.phpt | 120 +++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 ext/oci8/tests/lob_028.phpt create mode 100644 ext/oci8/tests/lob_029.phpt diff --git a/ext/oci8/tests/lob_028.phpt b/ext/oci8/tests/lob_028.phpt new file mode 100644 index 0000000000..e175632b09 --- /dev/null +++ b/ext/oci8/tests/lob_028.phpt @@ -0,0 +1,122 @@ +--TEST-- +Test descriptor types for oci_new_descriptor() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL +Done +--UEXPECTF-- +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +object(OCI-Lob)#%d (1) { + [u"descriptor"]=> + resource(%d) of type (oci8 descriptor) +} + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL + +Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d +NULL +Done diff --git a/ext/oci8/tests/lob_029.phpt b/ext/oci8/tests/lob_029.phpt new file mode 100644 index 0000000000..6dc9182257 --- /dev/null +++ b/ext/oci8/tests/lob_029.phpt @@ -0,0 +1,120 @@ +--TEST-- +reading/writing BFILE LOBs +--SKIPIF-- + +--FILE-- +read(40); +var_dump($r); + +unlink($fullname); + +$s = oci_parse($c, "drop table FileTest"); +oci_execute($s); + +$s = oci_parse($c, "drop directory TestDir"); +oci_execute($s); + +echo "Done\n"; +?> +--EXPECTF-- +Test 1. Check how many rows in the table +array(1) { + ["NUMROWS"]=> + array(1) { + [0]=> + string(1) "1" + } +} +Test 2 +array(3) { + ["FILENUM"]=> + array(1) { + [0]=> + string(1) "1" + } + ["FILEDESC"]=> + array(1) { + [0]=> + string(13) "Description 1" + } + ["IMAGE"]=> + array(1) { + [0]=> + string(22) "Some text in the bfile" + } +} +Test 3 +string(22) "Some text in the bfile" +Done +--UEXPECTF-- +Test 1. Check how many rows in the table +array(1) { + [u"NUMROWS"]=> + array(1) { + [0]=> + unicode(1) "1" + } +} +Test 2 +array(3) { + [u"FILENUM"]=> + array(1) { + [0]=> + unicode(1) "1" + } + [u"FILEDESC"]=> + array(1) { + [0]=> + unicode(13) "Description 1" + } + [u"IMAGE"]=> + array(1) { + [0]=> + string(22) "Some text in the bfile" + } +} +Test 3 +string(22) "Some text in the bfile" +Done -- 2.40.0