diff options
| author | Christopher Jones <sixd@php.net> | 2011-06-10 19:16:35 +0000 |
|---|---|---|
| committer | Christopher Jones <sixd@php.net> | 2011-06-10 19:16:35 +0000 |
| commit | a643bda32d068f0170143b032dc151cc481f8f36 (patch) | |
| tree | 252fa3a120969831829c76e0e9afc8a67ed03935 /ext/oci8/tests/cursor_bind_err.phpt | |
| parent | 199510ef07d93536ecaad5d30f58ffe0b2049949 (diff) | |
| download | php-git-a643bda32d068f0170143b032dc151cc481f8f36.tar.gz | |
Add new OCI8 tests. Refactor skipifs. Sync 5.3/5.4/trunk branches
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"; |
