Commit:    8c3bf96022ff6fb6be1e7bc87b794cab9e9bf90c
Author:    Christopher Jones <s...@php.net>         Tue, 14 Aug 2012 11:41:36 
-0700
Parents:   8848778a59ddde777258261a3888baeb3a70dea1
Branches:  PHP-5.3 PHP-5.4 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=8c3bf96022ff6fb6be1e7bc87b794cab9e9bf90c

Log:
Small test tidy up

Make some test changes so the tests can be run with the CLI webserver

Changed paths:
  M  ext/oci8/tests/details.inc
  M  ext/oci8/tests/xmltype_01.phpt


Diff:
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc
index 0f03c3a..9a86c46 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 21aca6c..ebbbb31 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


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to