diff options
Diffstat (limited to 'ext/oci8/tests/conn_attr_4.phpt')
| -rw-r--r-- | ext/oci8/tests/conn_attr_4.phpt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 4885f80b71..f32f9876d5 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -9,21 +9,27 @@ if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); -if (preg_match('/Release (11\.2|12)\./', oci_server_version($c), $matches) !== 1) { - // Bug fixed in 11.2 prevents client_info being rest +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) + ))) { + // Bug fixed in 11.2 prevents client_info being reset die("skip expected output only valid when using Oracle 11gR2 or greater database server"); -} else if (preg_match('/^1[01]\./', oci_client_version()) != 1) { +} +preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); +if (isset($matches[0]) && $matches[0] < 10) { die("skip test expected to work only with Oracle 10g or greater version of client"); } ?> --FILE-- <?php +$testuser = 'testuser_attr_4'; // Used in conn_attr.inc +$testpassword = 'testuser'; require(dirname(__FILE__)."/conn_attr.inc"); -$user='testuser'; -$password='testuser'; $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); echo"**Test Negative cases************\n"; @@ -40,7 +46,7 @@ var_dump(oci_set_client_info($str1,$str1)); // Setting an Invalid value. echo "\nInvalid Value \n"; -$c1=oci_connect($user,$password,$dbase); +$c1=oci_connect($testuser,$testpassword,$dbase); var_dump(oci_set_action($c1,$c1)); // Setting values multiple times. |
