Browse Source
Add oci_client_version() returning the runtime Oracle client library version - predominantly useful for the test suite
pull/271/head
Add oci_client_version() returning the runtime Oracle client library version - predominantly useful for the test suite
pull/271/head
5 changed files with 88 additions and 0 deletions
-
36ext/oci8/oci8.c
-
11ext/oci8/oci8_interface.c
-
1ext/oci8/php_oci8_int.h
-
20ext/oci8/tests/clientversion.phpt
-
20ext/oci8/tests/clientversion_92.phpt
@ -0,0 +1,20 @@ |
|||
--TEST-- |
|||
oci_client_version() |
|||
--SKIPIF-- |
|||
<?php |
|||
if (!extension_loaded('oci8')) die("skip no oci8 extension"); |
|||
if (preg_match('/^1[012]\./', oci_client_version()) != 1) { |
|||
die("skip test expected to work only with Oracle 10g or greater version of client"); |
|||
} |
|||
?> |
|||
--FILE-- |
|||
<?php |
|||
|
|||
echo oci_client_version(), "\n"; |
|||
|
|||
?> |
|||
===DONE=== |
|||
<?php exit(0); ?> |
|||
--EXPECTF-- |
|||
%d.%d.%d.%d.%d |
|||
===DONE=== |
|||
@ -0,0 +1,20 @@ |
|||
--TEST-- |
|||
oci_client_version() for Oracle 9.2 client libraries |
|||
--SKIPIF-- |
|||
<?php |
|||
if (!extension_loaded('oci8')) die("skip no oci8 extension"); |
|||
if (preg_match('/Unknown/', oci_client_version()) != 1) { |
|||
die("skip test expected to work only with Oracle 9gR2 client libraries"); |
|||
} |
|||
?> |
|||
--FILE-- |
|||
<?php |
|||
|
|||
echo oci_client_version(), "\n"; |
|||
|
|||
?> |
|||
===DONE=== |
|||
<?php exit(0); ?> |
|||
--EXPECTF-- |
|||
Unknown |
|||
===DONE=== |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue