diff options
author | Christopher Jones <sixd@php.net> | 2012-08-14 11:45:24 -0700 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2012-08-14 11:45:24 -0700 |
commit | 2b934dfdf930ee5863b9b1a5895ecf0d543a0b98 (patch) | |
tree | c602d0849dd657b0161583ea7d90a0898150b800 /ext/oci8 | |
parent | 1a527397cc5cf6d745205c21d7e34a9e789189f1 (diff) | |
parent | 8c3bf96022ff6fb6be1e7bc87b794cab9e9bf90c (diff) | |
download | php-git-2b934dfdf930ee5863b9b1a5895ecf0d543a0b98.tar.gz |
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
Small test tidy up
Diffstat (limited to 'ext/oci8')
-rw-r--r-- | ext/oci8/tests/details.inc | 53 | ||||
-rw-r--r-- | ext/oci8/tests/xmltype_01.phpt | 1 |
2 files changed, 29 insertions, 25 deletions
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 0f03c3a65f..9a86c46868 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -45,31 +45,34 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) { * Used for creating/dropping schema objects used by a test */ -function oci8_test_sql_execute($c, $stmtarray) -{ - foreach ($stmtarray as $stmt) { - $s = oci_parse($c, $stmt); - if (!$s) { - $m = oci_error($c); - echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; - } - else { - $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 - , 1918 // user does not exist - , 2024 // database link not found - , 2289 // sequence does not exist - , 4080 // trigger does not exist - , 38802 // edition does not exist - ))) { - echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; - } - } - } - } +if (!function_exists('oci8_test_sql_execute')) { + function oci8_test_sql_execute($c, $stmtarray) + { + foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + if (!$s) { + $m = oci_error($c); + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + else { + $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 + , 1918 // user does not exist + , 2024 // database link not found + , 2289 // sequence does not exist + , 4080 // trigger does not exist + , 38802 // edition does not exist + ))) { + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + } + } + } + } + } ?> diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt index 21aca6cc12..ebbbb31fac 100644 --- a/ext/oci8/tests/xmltype_01.phpt +++ b/ext/oci8/tests/xmltype_01.phpt @@ -5,6 +5,7 @@ Basic XMLType test if (!extension_loaded("simplexml")) die("skip no simplexml extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +?> --FILE-- <?php |