mirror of
https://github.com/php/php-src.git
synced 2026-04-23 07:58:20 +02:00
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Small test tidy up
This commit is contained in:
+28
-25
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user