summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/refcur_prefetch_2.phpt
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2013-10-16 22:02:32 -0700
committerChristopher Jones <sixd@php.net>2013-10-16 22:02:32 -0700
commit0d909f5bfcfa54d7bfad41270df435500e909da7 (patch)
tree67c2402add5a63a729c6f5edd2a9f09d2bb9d5f2 /ext/oci8/tests/refcur_prefetch_2.phpt
parenta1a7522105c333aff3d8c6c61ec68a85c8dd9927 (diff)
downloadphp-git-0d909f5bfcfa54d7bfad41270df435500e909da7.tar.gz
OCI8: Mostly SKIPIF version updates to simplify version checks at the expense of not testing some edge cases with older Oracle patch set versions.
Delete two obsolete .phpt's.
Diffstat (limited to 'ext/oci8/tests/refcur_prefetch_2.phpt')
-rw-r--r--ext/oci8/tests/refcur_prefetch_2.phpt13
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/oci8/tests/refcur_prefetch_2.phpt b/ext/oci8/tests/refcur_prefetch_2.phpt
index 8d65251077..9b2472db5d 100644
--- a/ext/oci8/tests/refcur_prefetch_2.phpt
+++ b/ext/oci8/tests/refcur_prefetch_2.phpt
@@ -4,9 +4,16 @@ Prefetch with REF cursor. Test No 2
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[012]\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10g or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ ($matches[1] >= 10))) {
+ die("skip expected output only valid when using Oracle 10g or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>