cvs: php-src(PHP_5_3) /ext/sybase_ct/tests test.inc test_connection_caching.phpt
| From: | Timm Friebe | Date: | Mon, 10 Nov 2008 11:00:48 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/sybase_ct/tests test.inc test_connection_caching.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-54183@lists.php.net to get a copy of this message | ||
thekid Mon Nov 10 11:00:48 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/sybase_ct/tests test.inc test_connection_caching.phpt
Log:
- Added test for optional parameter "new" to sybase_connect()
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test.inc?r1=1.4.6.3.2.1&r2=1.4.6.3.2.2&diff_format=u
Index: php-src/ext/sybase_ct/tests/test.inc
diff -u php-src/ext/sybase_ct/tests/test.inc:1.4.6.3.2.1
php-src/ext/sybase_ct/tests/test.inc:1.4.6.3.2.2
--- php-src/ext/sybase_ct/tests/test.inc:1.4.6.3.2.1 Sat Nov 8 11:47:35 2008
+++ php-src/ext/sybase_ct/tests/test.inc Mon Nov 10 11:00:48 2008
@@ -1,7 +1,7 @@
<?php
/* This file is part of PHP test framework for ext/sybase_ct
*
- * $Id: test.inc,v 1.4.6.3.2.1 2008/11/08 11:47:35 thekid Exp $
+ * $Id: test.inc,v 1.4.6.3.2.2 2008/11/10 11:00:48 thekid Exp $
*/
// Change if needed
@@ -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;
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test_connection_caching.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/sybase_ct/tests/test_connection_caching.phpt
diff -u php-src/ext/sybase_ct/tests/test_connection_caching.phpt:1.1.2.1
php-src/ext/sybase_ct/tests/test_connection_caching.phpt:1.1.2.2
--- php-src/ext/sybase_ct/tests/test_connection_caching.phpt:1.1.2.1 Sun Nov 9 10:57:09 2008
+++ php-src/ext/sybase_ct/tests/test_connection_caching.phpt Mon Nov 10 11:00:48 2008
@@ -6,18 +6,21 @@
<?php
/* This file is part of PHP test framework for ext/sybase_ct
*
- * $Id: test_connection_caching.phpt,v 1.1.2.1 2008/11/09 10:57:09 thekid Exp $
+ * $Id: test_connection_caching.phpt,v 1.1.2.2 2008/11/10 11:00:48 thekid Exp $
*/
require('test.inc');
$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)