diff options
author | Christopher Jones <sixd@php.net> | 2013-10-16 22:33:34 -0700 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2013-10-16 22:33:34 -0700 |
commit | 89e93bd2a27d66c9d56218e31cd42441298548e6 (patch) | |
tree | 442e4aaebf8488a448804a4578f94bd84a941261 /ext | |
parent | 0d909f5bfcfa54d7bfad41270df435500e909da7 (diff) | |
download | php-git-89e93bd2a27d66c9d56218e31cd42441298548e6.tar.gz |
OCI8: More test updates
Diffstat (limited to 'ext')
-rw-r--r-- | ext/oci8/tests/connect_without_oracle_home_old.phpt | 3 | ||||
-rw-r--r-- | ext/oci8/tests/drcp_privileged.phpt | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt index 82d8ae451b..d6d12b47ba 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 da8702e3c9..3871341bc5 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 |