sixd                                     Wed, 10 Nov 2010 18:46:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=305255

Log:
Improve test portability

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/debug.phpt
    U   php/php-src/branches/PHP_5_3/ext/oci8/tests/oci8safemode.phpt
    U   php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt
    U   php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt
    U   php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt
    U   php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt
    U   php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt
    U   php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt
    U   php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt
    U   php/php-src/trunk/ext/oci8/tests/debug.phpt

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR

 require(dirname(__FILE__).'/connect.inc');

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 19gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 database");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/debug.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/debug.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/debug.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -1,16 +1,7 @@
 --TEST--
 oci_internal_debug()
 --SKIPIF--
-<?php
-if (!extension_loaded('oci8')) die("skip no oci8 extension");
-ob_start();
-phpinfo(INFO_MODULES);
-$phpinfo = ob_get_clean();
-$iv = preg_match('/Oracle .*Version => (11\.2|12\.)/', $phpinfo);
-if ($iv !== 1) {
-   	die ("skip expected output only valid when using Oracle 11gR2+ client libraries");
-}
-?>
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
 --FILE--
 <?php

@@ -27,45 +18,8 @@

 echo "Done\n";

+oci_internal_debug(false);
+
 ?>
---EXPECTF--
-OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d)
-OCI8 DEBUG L1: Got NO cached connection at (%s:%d)
-OCI8 DEBUG: OCIEnvNlsCreate at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCISessionPoolCreate at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG L1: create_spool: (%s:%d)
-OCI8 DEBUG L1: using shared pool: (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG L1: (numopen=0)(numbusy=0) at (%s:%d)
-OCI8 DEBUG: OCISessionGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIContextGetValue at (%s:%d)
-OCI8 DEBUG: OCIContextGetValue at (%s:%d)
-OCI8 DEBUG: OCIMemoryAlloc at (%s:%d)
-OCI8 DEBUG: OCIContextSetValue at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG L1: New Non-Persistent Connection address: (%s) at (%s:%d)
-OCI8 DEBUG L1: num_persistent=(%s:%d)
-OCI8 DEBUG: OCISessionRelease at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-Done
-OCI8 DEBUG: OCISessionPoolDestroy at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
+--EXPECTREGEX--
+^OCI8 DEBUG: .*Done$

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/oci8safemode.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/oci8safemode.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/oci8safemode.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -15,7 +15,7 @@
 echo "Done\n";
 ?>
 --EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
+%s: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0

 Warning: oci_connect(): Privileged connect is disabled in Safe Mode in %s on line %d


Modified: php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR

 require(dirname(__FILE__).'/connect.inc');

Modified: php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 19gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 database");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
+} else {
+    ob_start();
+    phpinfo(INFO_MODULES);
+    $phpinfo = ob_get_clean();
+    $iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
+    if ($iv != 1) {
+        die ("skip test expected to work only with Oracle 11g or greater version of client");
+    }
 }
 ?>
 --FILE--
 <?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff with a 32bit 11.2.0.1 DB
-
 require dirname(__FILE__).'/connect.inc';

 $create_st = array();

Modified: php/php-src/trunk/ext/oci8/tests/debug.phpt
===================================================================
--- php/php-src/trunk/ext/oci8/tests/debug.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/trunk/ext/oci8/tests/debug.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -1,16 +1,7 @@
 --TEST--
 oci_internal_debug()
 --SKIPIF--
-<?php
-if (!extension_loaded('oci8')) die("skip no oci8 extension");
-ob_start();
-phpinfo(INFO_MODULES);
-$phpinfo = ob_get_clean();
-$iv = preg_match('/Oracle .*Version => (11\.2|12\.)/', $phpinfo);
-if ($iv !== 1) {
-   	die ("skip expected output only valid when using Oracle 11gR2+ client libraries");
-}
-?>
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
 --FILE--
 <?php

@@ -27,45 +18,8 @@

 echo "Done\n";

+oci_internal_debug(false);
+
 ?>
---EXPECTF--
-OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d)
-OCI8 DEBUG L1: Got NO cached connection at (%s:%d)
-OCI8 DEBUG: OCIEnvNlsCreate at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCISessionPoolCreate at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG L1: create_spool: (%s:%d)
-OCI8 DEBUG L1: using shared pool: (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG L1: (numopen=0)(numbusy=0) at (%s:%d)
-OCI8 DEBUG: OCISessionGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIAttrGet at (%s:%d)
-OCI8 DEBUG: OCIContextGetValue at (%s:%d)
-OCI8 DEBUG: OCIContextGetValue at (%s:%d)
-OCI8 DEBUG: OCIMemoryAlloc at (%s:%d)
-OCI8 DEBUG: OCIContextSetValue at (%s:%d)
-OCI8 DEBUG: OCIAttrSet at (%s:%d)
-OCI8 DEBUG L1: New Non-Persistent Connection address: (%s) at (%s:%d)
-OCI8 DEBUG L1: num_persistent=(%s:%d)
-OCI8 DEBUG: OCISessionRelease at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-Done
-OCI8 DEBUG: OCISessionPoolDestroy at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
+--EXPECTREGEX--
+^OCI8 DEBUG: .*Done$
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to