summaryrefslogtreecommitdiff
path: root/ext/sybase_ct
diff options
context:
space:
mode:
authorTimm Friebe <thekid@php.net>2008-11-10 11:00:48 +0000
committerTimm Friebe <thekid@php.net>2008-11-10 11:00:48 +0000
commit15adc0ddaf4cab631c1978ab026c14e3c048da75 (patch)
tree91d1f23592ca9cae0ad3380262db9fbcfb04f4c0 /ext/sybase_ct
parent12abaadf8455a562cdf31f54aab3883261422961 (diff)
downloadphp-git-15adc0ddaf4cab631c1978ab026c14e3c048da75.tar.gz
- Added test for optional parameter "new" to sybase_connect()
Diffstat (limited to 'ext/sybase_ct')
-rw-r--r--ext/sybase_ct/tests/test.inc6
-rw-r--r--ext/sybase_ct/tests/test_connection_caching.phpt5
2 files changed, 7 insertions, 4 deletions
diff --git a/ext/sybase_ct/tests/test.inc b/ext/sybase_ct/tests/test.inc
index 107a74d856..8dd2f7fadf 100644
--- a/ext/sybase_ct/tests/test.inc
+++ b/ext/sybase_ct/tests/test.inc
@@ -49,11 +49,11 @@
var_dump(sybase_set_message_handler($handler));
}
- // {{{ resource sybase_connect_ex(string charset= NULL, string appname= NULL)
+ // {{{ resource sybase_connect_ex(string charset= NULL, string appname= NULL, bool new= FALSE)
// Connect to the sybase server using the defines HOST, USER and PASSWORD
- function sybase_connect_ex($charset= NULL, $appname= NULL) {
+ function sybase_connect_ex($charset= NULL, $appname= NULL, $new= FALSE) {
sybase_min_server_severity(11); // Suppress "changed database context"
- if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset ? $charset : 'iso_1', $appname))) {
+ if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset ? $charset : 'iso_1', $appname, $new))) {
die('Connect to '.USER.'@'.HOST.' failed (using password: '.(PASSWORD ? 'yes' : 'no').')');
}
return $db;
diff --git a/ext/sybase_ct/tests/test_connection_caching.phpt b/ext/sybase_ct/tests/test_connection_caching.phpt
index c3363066e0..d59aedebf6 100644
--- a/ext/sybase_ct/tests/test_connection_caching.phpt
+++ b/ext/sybase_ct/tests/test_connection_caching.phpt
@@ -13,11 +13,14 @@ Sybase-CT connection caching
$db1= sybase_connect_ex();
$db2= sybase_connect_ex();
- var_dump($db1, $db2, (string)$db1 == (string)$db2);
+ $db3= sybase_connect_ex(NULL, NULL, $new= TRUE);
+ var_dump($db1, $db2, $db3, (string)$db1 == (string)$db2, (string)$db2 == (string)$db3);
sybase_close($db1);
?>
--EXPECTF--
resource(%d) of type (sybase-ct link)
resource(%d) of type (sybase-ct link)
+resource(%d) of type (sybase-ct link)
bool(true)
+bool(false)