[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sybase_ct/tests test.inc test_connection_caching.phpt

2008-11-10 Thread Timm Friebe
thekid  Mon Nov 10 11:00:48 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sybase_ct/teststest.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.1r2=1.4.6.3.2.2diff_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.1Sat Nov  8 11:47:35 2008
+++ php-src/ext/sybase_ct/tests/test.incMon 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.1r2=1.1.2.2diff_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.1Sun Nov 
 9 10:57:09 2008
+++ php-src/ext/sybase_ct/tests/test_connection_caching.phptMon 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)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sybase_ct/tests test.inc

2008-11-08 Thread Timm Friebe
thekid  Sat Nov  8 11:47:35 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sybase_ct/teststest.inc 
  Log:
  - Changed source to read host, user and password from environment
  # E.g. nmake test TESTS=ext/sybase_ct PHP_SYBASE_HOST=db PHP_SYBASE_USER=sa 
PHP_SYBASE_PASS=***
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test.inc?r1=1.4.6.3r2=1.4.6.3.2.1diff_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 
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.3Tue May 22 11:36:55 2007
+++ php-src/ext/sybase_ct/tests/test.incSat Nov  8 11:47:35 2008
@@ -1,13 +1,13 @@
 ?php
 /* This file is part of PHP test framework for ext/sybase_ct
  *
- * $Id: test.inc,v 1.4.6.3 2007/05/22 11:36:55 thekid Exp $ 
+ * $Id: test.inc,v 1.4.6.3.2.1 2008/11/08 11:47:35 thekid Exp $ 
  */
 
   // Change if needed
-  define('HOST', '');
-  define('USER', '');
-  define('PASSWORD', '');
+  define('HOST', getenv('PHP_SYBASE_HOST'));
+  define('USER', getenv('PHP_SYBASE_USER'));
+  define('PASSWORD', getenv('PHP_SYBASE_PASS'));
   define('TEMPDB',   'tempdb');
 
   // {{{ bool sybase_msg_handler(int msgnumber, int severity, int state, int 
line, string text)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php