com php-src: Reduce test noise on cross Oracle client <-> server version tests. This fix is already in PHP 5.6+: ext/oci8/tests/drcp _cclass1.phpt

From: Date: Tue, 25 Feb 2014 01:01:30 +0000
Subject: com php-src: Reduce test noise on cross Oracle client <-> server version tests. This fix is already in PHP 5.6+: ext/oci8/tests/drcp _cclass1.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76195@lists.php.net to get a copy of this message
Commit: ee7671afb5d87b7509b2a815a6b151e3a8a74e76 Author: Christopher Jones <sixd@php.net> Mon, 24 Feb 2014 17:01:30 -0800 Parents: 8cdefd3d101fe6c6ebca742b51204b13ab506842 Branches: PHP-5.4 PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee7671afb5d87b7509b2a815a6b151e3a8a74e76 Log: Reduce test noise on cross Oracle client <-> server version tests. This fix is already in PHP 5.6+ Changed paths: M ext/oci8/tests/drcp_cclass1.phpt Diff: diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt index 068331e..5c78a29 100644 --- a/ext/oci8/tests/drcp_cclass1.phpt +++ b/ext/oci8/tests/drcp_cclass1.phpt @@ -3,9 +3,21 @@ DRCP: Test setting connection class inline --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 testing DRCP connection class only works in DRCP mode"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); + +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'); +} ?> --FILE-- <?php

« previous php.cvs (#76195) next »