From: Christopher Jones Date: Fri, 2 Oct 2009 20:16:59 +0000 (+0000) Subject: refactor tests X-Git-Tag: php-5.4.0alpha1~191^2~2550 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73b9ee934f630e205577d355e1123c0fdd885b03;p=php refactor tests --- diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index df319feb05..2463e70c76 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -5,30 +5,58 @@ Bug #26133 (ocifreedesc() segfault) --FILE-- free(); - } - - require dirname(__FILE__).'/drop_table.inc'; - - echo "Done\n"; +require(dirname(__FILE__).'/connect.inc'); + +// Initialize + +$stmtarray = array( + "drop table bug26133_tab", + "create table bug26133_tab (id number, value number)", +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + if (!in_array($m['code'], array( // ignore expected errors + 942 // table or view does not exist + ))) { + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + } +} + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +// Run Test + +$ora_sql = "INSERT INTO bug26133_tab (id, value) VALUES ('1','1') RETURNING ROWID INTO :v_rowid "; + +$statement = OCIParse($c,$ora_sql); +$rowid = OCINewDescriptor($c,OCI_D_ROWID); +OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID); +if (OCIExecute($statement)) { + OCICommit($c); +} +OCIFreeStatement($statement); +$rowid->free(); + +// Cleanup + +$stmtarray = array( + "drop table bug26133_tab" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +echo "Done\n"; ?> --EXPECT-- Done diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt index 00054f51e1..257c6977b8 100644 --- a/ext/oci8/tests/bug32325.phpt +++ b/ext/oci8/tests/bug32325.phpt @@ -1,21 +1,37 @@ --TEST-- -Bug #32325 (Can't retrieve collection using OCI8) +Bug #32325 (Cannot retrieve collection using OCI8) --SKIPIF-- --FILE-- size()); var_dump($collection->getelem(1)); var_dump($collection->getelem(2)); -$drop_stmt = oci_parse($c, "drop type ut_num_list_t"); -oci_execute($drop_stmt); +// Cleanup + +$stmtarray = array( + "drop type bug32325_t" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(4) float(2) float(3) diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt index 267c4d94fb..33bd04b6d2 100644 --- a/ext/oci8/tests/cursor_bind_err.phpt +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -5,26 +5,39 @@ binding a cursor (with errors) --FILE-- --EXPECTF-- -Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number in %s on line %d +Warning: oci_bind_by_name(): ORA-01036: %s in %s on line %d -Warning: oci_fetch_assoc(): ORA-24338: statement handle not executed in %s on line %d +Warning: oci_fetch_assoc(): ORA-24338: %s in %s on line %d bool(false) Done diff --git a/ext/oci8/tests/cursors_old.phpt b/ext/oci8/tests/cursors_old.phpt index f081126c7f..73447c82b4 100644 --- a/ext/oci8/tests/cursors_old.phpt +++ b/ext/oci8/tests/cursors_old.phpt @@ -5,26 +5,39 @@ fetching cursor from a statement --FILE-- --EXPECTF-- array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(1) "1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(1) "1" } bool(true) -Warning: ocifetchinto(): ORA-01002: fetch out of sequence in %s on line %d +Warning: ocifetchinto():%sORA-01002: %s in %scursors_old.php on line %d array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(1) "1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(1) "1" } bool(true) Done diff --git a/ext/oci8/tests/default_prefetch.phpt b/ext/oci8/tests/default_prefetch.phpt index cc02b6a1c3..47191c8585 100644 --- a/ext/oci8/tests/default_prefetch.phpt +++ b/ext/oci8/tests/default_prefetch.phpt @@ -7,26 +7,39 @@ oci8.default_prefetch=20 --FILE-- diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt index aa130e9f93..bcd66fa381 100644 --- a/ext/oci8/tests/default_prefetch1.phpt +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -7,26 +7,39 @@ oci8.default_prefetch=100 --FILE-- diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt index ac623a2744..7b3f29f296 100644 --- a/ext/oci8/tests/default_prefetch2.phpt +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -7,26 +7,39 @@ oci8.default_prefetch=100 --FILE-- diff --git a/ext/oci8/tests/define.phpt b/ext/oci8/tests/define.phpt index f9fb28f496..d99bc7e1a6 100644 --- a/ext/oci8/tests/define.phpt +++ b/ext/oci8/tests/define.phpt @@ -5,24 +5,36 @@ oci_define_by_name() --FILE-- ---EXPECT-- -unicode(4) "some" +--EXPECTF-- +%unicode|string%(%d) "some" Done diff --git a/ext/oci8/tests/define1.phpt b/ext/oci8/tests/define1.phpt index a0c74dc080..341bc9ed83 100644 --- a/ext/oci8/tests/define1.phpt +++ b/ext/oci8/tests/define1.phpt @@ -5,24 +5,36 @@ oci_define_by_name() --FILE-- ---EXPECT-- -bool(true) -bool(true) +--EXPECTF-- Test 1 - must do define before execute bool(true) NULL -unicode(4) "some" +%unicode|string%(4) "some" Test 2 - normal define order bool(true) -unicode(4) "some" +%unicode|string%(4) "some" Test 3 - no new define done -unicode(4) "some" -unicode(5) "thing" +%unicode|string%(4) "some" +%unicode|string%(5) "thing" Done + diff --git a/ext/oci8/tests/define_old.phpt b/ext/oci8/tests/define_old.phpt index 825d0b0787..618f9d5f57 100644 --- a/ext/oci8/tests/define_old.phpt +++ b/ext/oci8/tests/define_old.phpt @@ -5,24 +5,36 @@ ocidefinebyname() --FILE-- ---EXPECT-- -unicode(4) "some" +--EXPECTF-- +%unicode|string%(4) "some" Done diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt index deacde200a..5206324940 100644 --- a/ext/oci8/tests/fetch.phpt +++ b/ext/oci8/tests/fetch.phpt @@ -5,28 +5,39 @@ ocifetch() & ociresult() --FILE-- ---EXPECT-- -unicode(1) "1" -unicode(1) "1" -unicode(1) "1" -unicode(1) "1" -unicode(1) "1" -unicode(1) "1" +--EXPECTF-- +%unicode|string%(1) "1" +%unicode|string%(1) "1" +%unicode|string%(1) "1" +%unicode|string%(1) "1" +%unicode|string%(1) "1" +%unicode|string%(1) "1" Done diff --git a/ext/oci8/tests/fetch_all.phpt b/ext/oci8/tests/fetch_all.phpt index 63452ec749..a007bac830 100644 --- a/ext/oci8/tests/fetch_all.phpt +++ b/ext/oci8/tests/fetch_all.phpt @@ -5,28 +5,32 @@ oci_fetch_all() --FILE-- ---EXPECT-- +--EXPECTF-- int(3) -array(5) { - [u"ID"]=> +array(2) { + [%u|b%"ID"]=> array(3) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" + %unicode|string%(1) "1" [2]=> - unicode(1) "1" + %unicode|string%(1) "1" } - [u"VALUE"]=> + [%u|b%"VALUE"]=> array(3) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" + %unicode|string%(1) "1" [2]=> - unicode(1) "1" - } - [u"BLOB"]=> - array(3) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - } - [u"CLOB"]=> - array(3) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - } - [u"STRING"]=> - array(3) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL + %unicode|string%(1) "1" } } int(3) -array(5) { - [u"ID"]=> - array(3) { - [0]=> - unicode(1) "1" - [1]=> - unicode(1) "1" - [2]=> - unicode(1) "1" - } - [u"VALUE"]=> - array(3) { - [0]=> - unicode(1) "1" - [1]=> - unicode(1) "1" - [2]=> - unicode(1) "1" - } - [u"BLOB"]=> - array(3) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - } - [u"CLOB"]=> +array(2) { + [%u|b%"ID"]=> array(3) { [0]=> - NULL + %unicode|string%(1) "1" [1]=> - NULL + %unicode|string%(1) "1" [2]=> - NULL + %unicode|string%(1) "1" } - [u"STRING"]=> + [%u|b%"VALUE"]=> array(3) { [0]=> - NULL + %unicode|string%(1) "1" [1]=> - NULL + %unicode|string%(1) "1" [2]=> - NULL + %unicode|string%(1) "1" } } Done diff --git a/ext/oci8/tests/fetch_all3.phpt b/ext/oci8/tests/fetch_all3.phpt index 51f904baa9..42fe617dc9 100644 --- a/ext/oci8/tests/fetch_all3.phpt +++ b/ext/oci8/tests/fetch_all3.phpt @@ -5,11 +5,34 @@ oci_fetch_all() - all combinations of flags --FILE-- ---EXPECT-- +--EXPECTF-- None int(4) array(2) { - [u"ID"]=> + [%u|b%"ID"]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } - [u"VALUE"]=> + [%u|b%"VALUE"]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_ASSOC int(4) array(2) { - [u"ID"]=> + [%u|b%"ID"]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } - [u"VALUE"]=> + [%u|b%"VALUE"]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_COLUMN int(4) array(2) { - [u"ID"]=> + [%u|b%"ID"]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } - [u"VALUE"]=> + [%u|b%"VALUE"]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_COLUMN|OCI_ASSOC int(4) array(2) { - [u"ID"]=> + [%u|b%"ID"]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } - [u"VALUE"]=> + [%u|b%"VALUE"]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_COLUMN|OCI_NUM @@ -220,24 +255,24 @@ array(2) { [0]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } [1]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_COLUMN|OCI_NUM|OCI_ASSOC @@ -246,24 +281,24 @@ array(2) { [0]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } [1]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW @@ -271,31 +306,31 @@ int(4) array(4) { [0]=> array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(2) "-1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-1" } [1]=> array(2) { - [u"ID"]=> - unicode(1) "2" - [u"VALUE"]=> - unicode(2) "-2" + [%u|b%"ID"]=> + %unicode|string%(1) "2" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-2" } [2]=> array(2) { - [u"ID"]=> - unicode(1) "3" - [u"VALUE"]=> - unicode(2) "-3" + [%u|b%"ID"]=> + %unicode|string%(1) "3" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-3" } [3]=> array(2) { - [u"ID"]=> - unicode(1) "4" - [u"VALUE"]=> - unicode(2) "-4" + [%u|b%"ID"]=> + %unicode|string%(1) "4" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_ASSOC @@ -303,31 +338,31 @@ int(4) array(4) { [0]=> array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(2) "-1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-1" } [1]=> array(2) { - [u"ID"]=> - unicode(1) "2" - [u"VALUE"]=> - unicode(2) "-2" + [%u|b%"ID"]=> + %unicode|string%(1) "2" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-2" } [2]=> array(2) { - [u"ID"]=> - unicode(1) "3" - [u"VALUE"]=> - unicode(2) "-3" + [%u|b%"ID"]=> + %unicode|string%(1) "3" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-3" } [3]=> array(2) { - [u"ID"]=> - unicode(1) "4" - [u"VALUE"]=> - unicode(2) "-4" + [%u|b%"ID"]=> + %unicode|string%(1) "4" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_FETCHSTATEMENT_BY_COLUMN @@ -335,31 +370,31 @@ int(4) array(4) { [0]=> array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(2) "-1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-1" } [1]=> array(2) { - [u"ID"]=> - unicode(1) "2" - [u"VALUE"]=> - unicode(2) "-2" + [%u|b%"ID"]=> + %unicode|string%(1) "2" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-2" } [2]=> array(2) { - [u"ID"]=> - unicode(1) "3" - [u"VALUE"]=> - unicode(2) "-3" + [%u|b%"ID"]=> + %unicode|string%(1) "3" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-3" } [3]=> array(2) { - [u"ID"]=> - unicode(1) "4" - [u"VALUE"]=> - unicode(2) "-4" + [%u|b%"ID"]=> + %unicode|string%(1) "4" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_FETCHSTATEMENT_BY_COLUMN|OCI_ASSOC @@ -367,31 +402,31 @@ int(4) array(4) { [0]=> array(2) { - [u"ID"]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(2) "-1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-1" } [1]=> array(2) { - [u"ID"]=> - unicode(1) "2" - [u"VALUE"]=> - unicode(2) "-2" + [%u|b%"ID"]=> + %unicode|string%(1) "2" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-2" } [2]=> array(2) { - [u"ID"]=> - unicode(1) "3" - [u"VALUE"]=> - unicode(2) "-3" + [%u|b%"ID"]=> + %unicode|string%(1) "3" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-3" } [3]=> array(2) { - [u"ID"]=> - unicode(1) "4" - [u"VALUE"]=> - unicode(2) "-4" + [%u|b%"ID"]=> + %unicode|string%(1) "4" + [%u|b%"VALUE"]=> + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_FETCHSTATEMENT_BY_COLUMN|OCI_NUM @@ -400,30 +435,30 @@ array(4) { [0]=> array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(2) "-1" + %unicode|string%(2) "-1" } [1]=> array(2) { [0]=> - unicode(1) "2" + %unicode|string%(1) "2" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" } [2]=> array(2) { [0]=> - unicode(1) "3" + %unicode|string%(1) "3" [1]=> - unicode(2) "-3" + %unicode|string%(2) "-3" } [3]=> array(2) { [0]=> - unicode(1) "4" + %unicode|string%(1) "4" [1]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_FETCHSTATEMENT_BY_COLUMN|OCI_NUM|OCI_ASSOC @@ -432,30 +467,30 @@ array(4) { [0]=> array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(2) "-1" + %unicode|string%(2) "-1" } [1]=> array(2) { [0]=> - unicode(1) "2" + %unicode|string%(1) "2" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" } [2]=> array(2) { [0]=> - unicode(1) "3" + %unicode|string%(1) "3" [1]=> - unicode(2) "-3" + %unicode|string%(2) "-3" } [3]=> array(2) { [0]=> - unicode(1) "4" + %unicode|string%(1) "4" [1]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_NUM @@ -464,30 +499,30 @@ array(4) { [0]=> array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(2) "-1" + %unicode|string%(2) "-1" } [1]=> array(2) { [0]=> - unicode(1) "2" + %unicode|string%(1) "2" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" } [2]=> array(2) { [0]=> - unicode(1) "3" + %unicode|string%(1) "3" [1]=> - unicode(2) "-3" + %unicode|string%(2) "-3" } [3]=> array(2) { [0]=> - unicode(1) "4" + %unicode|string%(1) "4" [1]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_FETCHSTATEMENT_BY_ROW|OCI_NUM|OCI_ASSOC @@ -496,30 +531,30 @@ array(4) { [0]=> array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(2) "-1" + %unicode|string%(2) "-1" } [1]=> array(2) { [0]=> - unicode(1) "2" + %unicode|string%(1) "2" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" } [2]=> array(2) { [0]=> - unicode(1) "3" + %unicode|string%(1) "3" [1]=> - unicode(2) "-3" + %unicode|string%(2) "-3" } [3]=> array(2) { [0]=> - unicode(1) "4" + %unicode|string%(1) "4" [1]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_NUM @@ -528,24 +563,24 @@ array(2) { [0]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } [1]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } OCI_NUM|OCI_ASSOC @@ -554,24 +589,24 @@ array(2) { [0]=> array(4) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "2" + %unicode|string%(1) "2" [2]=> - unicode(1) "3" + %unicode|string%(1) "3" [3]=> - unicode(1) "4" + %unicode|string%(1) "4" } [1]=> array(4) { [0]=> - unicode(2) "-1" + %unicode|string%(2) "-1" [1]=> - unicode(2) "-2" + %unicode|string%(2) "-2" [2]=> - unicode(2) "-3" + %unicode|string%(2) "-3" [3]=> - unicode(2) "-4" + %unicode|string%(2) "-4" } } Done diff --git a/ext/oci8/tests/fetch_into.phpt b/ext/oci8/tests/fetch_into.phpt index aa0ceaed85..17e06e1cf8 100644 --- a/ext/oci8/tests/fetch_into.phpt +++ b/ext/oci8/tests/fetch_into.phpt @@ -5,78 +5,86 @@ ocifetchinto() --FILE-- ---EXPECT-- -int(5) +--EXPECTF-- +int(2) array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" + %unicode|string%(1) "1" } -int(5) -array(10) { +int(2) +array(4) { [0]=> - unicode(1) "1" - [u"ID"]=> - unicode(1) "1" + %unicode|string%(1) "1" + [%u|b%"ID"]=> + %unicode|string%(1) "1" [1]=> - unicode(1) "1" - [u"VALUE"]=> - unicode(1) "1" - [2]=> - NULL - [u"BLOB"]=> - NULL - [3]=> - NULL - [u"CLOB"]=> - NULL - [4]=> - NULL - [u"STRING"]=> - NULL + %unicode|string%(1) "1" + [%u|b%"VALUE"]=> + %unicode|string%(1) "1" } Done diff --git a/ext/oci8/tests/fetch_row.phpt b/ext/oci8/tests/fetch_row.phpt index 4425b32e42..c6084d4fe2 100644 --- a/ext/oci8/tests/fetch_row.phpt +++ b/ext/oci8/tests/fetch_row.phpt @@ -5,28 +5,39 @@ oci_fetch_row() --FILE-- ---EXPECT-- -array(5) { +--EXPECTF-- +array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL + %unicode|string%(1) "1" } -array(5) { +array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL + %unicode|string%(1) "1" } -array(5) { +array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL + %unicode|string%(1) "1" } Done diff --git a/ext/oci8/tests/field_funcs1.phpt b/ext/oci8/tests/field_funcs1.phpt index c34216e95b..0b4ad76b39 100644 --- a/ext/oci8/tests/field_funcs1.phpt +++ b/ext/oci8/tests/field_funcs1.phpt @@ -5,28 +5,39 @@ oci_field_*() family --FILE-- --EXPECTF-- -array(5) { +array(2) { [0]=> - unicode(1) "1" + %unicode|string%(1) "1" [1]=> - unicode(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL + %unicode|string%(1) "1" } Warning: oci_field_is_null(): Invalid column index "-1" in %s on line %d diff --git a/ext/oci8/tests/field_funcs2.phpt b/ext/oci8/tests/field_funcs2.phpt index 9b8d3e5a28..502d079139 100644 --- a/ext/oci8/tests/field_funcs2.phpt +++ b/ext/oci8/tests/field_funcs2.phpt @@ -5,10 +5,9 @@ Bug #41917 (invalid scale and precision) --FILE-- "NUMBER", @@ -29,7 +28,7 @@ $t = array("C01" => "NUMBER", "C16" => "REAL", ); -$stmt = "create table b41917t (\n"; +$stmt = "create table field_funcs2_tab (\n"; foreach ($t as $colname => $type) { $stmt .= "$colname $type,\n"; } @@ -38,7 +37,7 @@ $stmt[strlen($stmt)-2] = ")"; $s = oci_parse($c, $stmt); oci_execute($s); -$s = oci_parse($c, "select * from b41917t"); +$s = oci_parse($c, "select * from field_funcs2_tab"); oci_execute($s); for ($i = 1; $i <= oci_num_fields($s); $i++) { @@ -67,4 +66,4 @@ C13 FLOAT: precision 126, scale -127 C14 FLOAT(9): precision 9, scale -127 C15 DOUBLE PRECISION: precision 126, scale -127 C16 REAL: precision 63, scale -127 -Done \ No newline at end of file +Done diff --git a/ext/oci8/tests/num.phpt b/ext/oci8/tests/num.phpt index 458e3774f5..e9dc6a8ac2 100644 --- a/ext/oci8/tests/num.phpt +++ b/ext/oci8/tests/num.phpt @@ -5,8 +5,34 @@ oci_num_*() family --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt index cb9cb390e6..c2ac8fe841 100644 --- a/ext/oci8/tests/prefetch_old.phpt +++ b/ext/oci8/tests/prefetch_old.phpt @@ -5,26 +5,41 @@ ocisetprefetch() --FILE--