php-src/ext/oci8/tests/password_new.phpt
Christopher Jones 08eaa56798 MFH
Code:
  - Do scope-end release for oci_pconnect (oci8.old_oci_close_semantics=1 gives old behavior)
  - Fix session reuse with 10.2 client libs
  - Fix the Ping macro version check for 10.2
  - Add type check associated with zend_list_find
  - Code connection re-organized for reuse
  - Format comments
  - WS changes
  - Prepare for new PECL release
Tests:
  - Add new tests
  - Rationalize password tests
  - Revert use of __DIR__ so tests will work with PHP 5.2
  - Update some skipifs to make tests more portable
2008-04-18 00:05:27 +00:00

50 lines
1.3 KiB
PHP

--TEST--
oci_password_change()
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require dirname(__FILE__)."/connect.inc";
if (empty($dbase)) die ("skip requires database connection string be set");
if ($test_drcp) die("skip password change not supported in DRCP Mode");
// This test is known to fail with Oracle 10g client libraries
// connecting to Oracle Database 11.1.0.6 (Oracle bug 6277160)
$sv = oci_server_version($c);
$sv = preg_match('/11.1/', $sv, $matches);
if ($sv === 1) {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 10/', $phpinfo);
if ($iv === 1) {
die ("skip test known to fail using Oracle 10gR2 client libs connecting to Oracle 11.1 (6277160)");
}
}
?>
--FILE--
<?php
require dirname(__FILE__)."/connect.inc";
$new_password = "test";
var_dump(oci_password_change($dbase, $user, $password, $new_password));
if (!empty($dbase)) {
var_dump($new_c = ocilogon($user,$new_password,$dbase));
}
else {
var_dump($new_c = ocilogon($user,$new_password));
}
var_dump(oci_password_change($dbase, $user, $new_password, $password));
echo "Done\n";
?>
--EXPECTF--
resource(%d) of type (oci8 connection)
resource(%d) of type (oci8 connection)
resource(%d) of type (oci8 connection)
Done