summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/driver_name.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/tests/driver_name.phpt')
-rw-r--r--ext/oci8/tests/driver_name.phpt25
1 files changed, 11 insertions, 14 deletions
diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt
index f63979d6b5..0ff9bc485f 100644
--- a/ext/oci8/tests/driver_name.phpt
+++ b/ext/oci8/tests/driver_name.phpt
@@ -8,18 +8,15 @@ if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to
if ($test_drcp) die("skip as Output might vary with DRCP");
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] >= 2) ||
- ($matches[1] >= 12)
- ))) {
- die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+if (!(isset($matches[0]) &&
+ ($matches[1] == 12 && $matches[2] == 1 && $matches[3] >= 0
+ && $matches[4] >= 2) || ($matches[1] == 12 && $matches[2] > 1))) {
+ die("skip test expected to work only with Oracle 12.1.0.2 database or its later patchsets");
}
+
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");
+if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2) || ($matches[1] > 11))) {
+ die("skip test expected to work only with Oracle 11.2 or greater version of client");
}
?>
@@ -54,17 +51,17 @@ function get_attr($conn)
$s2 = oci_parse($conn,$sel_stmt);
oci_execute($s2,OCI_DEFAULT);
oci_fetch($s2);
- echo "The value of DRIVER_NAME is ".oci_result($s2,1)."\n";
+ echo "The value of DRIVER_NAME is ".trim(oci_result($s2,1))."\n";
}
?>
--EXPECT--
**Test 1.1 - Default values for the attribute **************
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
***Test 1.2 - Get the values from different connections **************
Testing with oci_pconnect()
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
Testing with oci_new_connect()
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
Done