From: Christopher Jones Date: Wed, 10 Nov 2010 18:46:05 +0000 (+0000) Subject: Improve test portability X-Git-Tag: php-5.3.4RC1~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bf58d8c7019241d1c28803d0d0d086b8fd6647c;p=php Improve test portability --- diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 71cccbfc50..24ab1fc825 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -8,14 +8,19 @@ $sv = oci_server_version($c); $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-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- (11\.2|12\.)/', $phpinfo); -if ($iv !== 1) { - die ("skip expected output only valid when using Oracle 11gR2+ client libraries"); -} -?> + --FILE-- ---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$ diff --git a/ext/oci8/tests/oci8safemode.phpt b/ext/oci8/tests/oci8safemode.phpt index 703393cc4e..02e180e654 100644 --- a/ext/oci8/tests/oci8safemode.phpt +++ b/ext/oci8/tests/oci8safemode.phpt @@ -15,7 +15,7 @@ $r = oci_password_change($c, "hr", "hrpwd", "hrpwd"); 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