com php-src: OCI8: More test updates: ext/oci8/tests/connect _without_oracle_home_old.phpt ext/oci8/tests/drcp _privileged.phpt
| From: | Christopher Jones | Date: | Thu, 17 Oct 2013 05:33:34 +0000 |
| Subject: | com php-src: OCI8: More test updates: ext/oci8/tests/connect _without_oracle_home_old.phpt ext/oci8/tests/drcp _privileged.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73678@lists.php.net to get a copy of this message | ||
Commit: 89e93bd2a27d66c9d56218e31cd42441298548e6
Author: Christopher Jones <sixd@php.net> Wed, 16 Oct 2013 22:33:34 -0700
Parents: 0d909f5bfcfa54d7bfad41270df435500e909da7
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=89e93bd2a27d66c9d56218e31cd42441298548e6
Log:
OCI8: More test updates
Changed paths:
M ext/oci8/tests/connect_without_oracle_home_old.phpt
M ext/oci8/tests/drcp_privileged.phpt
Diff:
diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt
b/ext/oci8/tests/connect_without_oracle_home_old.phpt
index 82d8ae4..d6d12b4 100644
--- a/ext/oci8/tests/connect_without_oracle_home_old.phpt
+++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt
@@ -30,5 +30,8 @@ else {
<?php exit(0); ?>
--EXPECTF--
Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with your system - please
check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d
+
+Warning: ocilogon(): %s ORA-01804
+ in %s on line %d
bool(false)
===DONE===
diff --git a/ext/oci8/tests/drcp_privileged.phpt b/ext/oci8/tests/drcp_privileged.phpt
index da8702e..3871341 100644
--- a/ext/oci8/tests/drcp_privileged.phpt
+++ b/ext/oci8/tests/drcp_privileged.phpt
@@ -3,7 +3,8 @@ DRCP: privileged connect
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
-require(dirname(__FILE__)."/details.inc");
+require(dirname(__FILE__)."/connect.inc");
+if (!$test_drcp) die("skip requires DRCP connection");
if (strcasecmp($user, "system") && strcasecmp($user, "sys"))
die("skip needs to be run as a DBA user");
ob_start();
phpinfo(INFO_MODULES);
@@ -12,6 +13,18 @@ if (preg_match('/Compile-time ORACLE_HOME/', $phpinfo) !== 1) {
// Assume building PHP with an ORACLE_HOME means the tested DB is on the same machine as PHP
die("skip this test is unlikely to work with a remote database - unless an Oracle password
file has been created");
}
+
+preg_match('/.*Release
([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/',
oci_server_version($c), $matches_sv);
+// This test in Oracle 12c needs a non-CDB or the root container
+if (isset($matches_sv[0]) && $matches_sv[1] >= 12) {
+ $s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'),
'notacdb') as dbtype from dual");
+ $r = @oci_execute($s);
+ if (!$r)
+ die('skip could not identify container type');
+ $r = oci_fetch_array($s);
+ if ($r['DBTYPE'] !== 'CDB$ROOT')
+ die('skip cannot run test using a PDB');
+}
?>
--INI--
oci8.privileged_connect=1