diff options
Diffstat (limited to 'ext/oci8/tests/cursor_bind_err.phpt')
| -rw-r--r-- | ext/oci8/tests/cursor_bind_err.phpt | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt index 33bd04b6d2..197aad1d19 100644 --- a/ext/oci8/tests/cursor_bind_err.phpt +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -1,7 +1,10 @@ --TEST-- binding a cursor (with errors) --SKIPIF-- -<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?> +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> --FILE-- <?php @@ -17,23 +20,7 @@ $stmtarray = array( "insert into cursor_bind_err_tab (id, value) values (1,1)", ); -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); -} +oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -54,10 +41,7 @@ $stmtarray = array( "drop table cursor_bind_err_tab" ); -foreach ($stmtarray as $stmt) { - $s = oci_parse($c, $stmt); - oci_execute($s); -} +oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; |
