[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
thekid Mon Nov 10 11:50:28 2008 UTC Modified files: /php-src/ext/sybase_ct/teststest.inc Log: - MFB: 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.7r2=1.8diff_format=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.7 php-src/ext/sybase_ct/tests/test.inc:1.8 --- php-src/ext/sybase_ct/tests/test.inc:1.7Fri Aug 10 13:28:11 2007 +++ php-src/ext/sybase_ct/tests/test.incMon Nov 10 11:50:28 2008 @@ -1,13 +1,13 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.7 2007/08/10 13:28:11 jani Exp $ + * $Id: test.inc,v 1.8 2008/11/10 11:50:28 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) @@ -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; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
tony2001Sun Mar 11 12:54:48 2007 UTC Modified files: /php-src/ext/sybase_ct/teststest.inc Log: fix sybase tests http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test.inc?r1=1.4r2=1.5diff_format=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.4 php-src/ext/sybase_ct/tests/test.inc:1.5 --- php-src/ext/sybase_ct/tests/test.inc:1.4Tue Feb 10 20:39:08 2004 +++ php-src/ext/sybase_ct/tests/test.incSun Mar 11 12:54:48 2007 @@ -1,7 +1,7 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.4 2004/02/10 20:39:08 thekid Exp $ + * $Id: test.inc,v 1.5 2007/03/11 12:54:48 tony2001 Exp $ */ // Change if needed @@ -78,7 +78,8 @@ // {{{ mixed sybase_select_single(resource dbh, string query) // Fires an SQL query and returns the first value from the first row function sybase_select_single($dbh, $query) { -return array_shift(sybase_fetch_row(sybase_query($query, $dbh))); + $a = sybase_fetch_row(sybase_query($query, $dbh)); + return array_shift($a); } // }}} ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
tony2001Sun Mar 11 12:56:38 2007 UTC Modified files: /php-src/ext/sybase_ct/teststest.inc Log: one more fix http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test.inc?r1=1.5r2=1.6diff_format=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.5 php-src/ext/sybase_ct/tests/test.inc:1.6 --- php-src/ext/sybase_ct/tests/test.inc:1.5Sun Mar 11 12:54:48 2007 +++ php-src/ext/sybase_ct/tests/test.incSun Mar 11 12:56:38 2007 @@ -1,7 +1,7 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.5 2007/03/11 12:54:48 tony2001 Exp $ + * $Id: test.inc,v 1.6 2007/03/11 12:56:38 tony2001 Exp $ */ // Change if needed @@ -28,7 +28,7 @@ // {{{ public static bool static_handler(int msgnumber, int severity, int state, int line, string text) // Handles server messages -function static_handler($msgnumber, $severity, $state, $line, $text) { +static function static_handler($msgnumber, $severity, $state, $line, $text) { return sybase_msg_handler($msgnumber, $severity, $state, $line, $text); } // }}} -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
thekid Tue Feb 10 15:39:09 2004 EDT Modified files: /php-src/ext/sybase_ct/teststest.inc Log: - Removed pointless call to error_reporting() http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test.inc?r1=1.3r2=1.4ty=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.3 php-src/ext/sybase_ct/tests/test.inc:1.4 --- php-src/ext/sybase_ct/tests/test.inc:1.3Sun Feb 8 19:14:24 2004 +++ php-src/ext/sybase_ct/tests/test.incTue Feb 10 15:39:08 2004 @@ -1,11 +1,9 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.3 2004/02/09 00:14:24 thekid Exp $ + * $Id: test.inc,v 1.4 2004/02/10 20:39:08 thekid Exp $ */ - error_reporting(E_ALL); - // Change if needed define('HOST', ''); define('USER', ''); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
Hello Timm, you shouldn't set the error severity at all because the test system should already take care about it unless you overwrite it because you are checking some error levels. best regards marcus Monday, February 9, 2004, 1:14:29 AM, you wrote: thekidSun Feb 8 19:14:29 2004 EDT Modified files: /php-src/ext/sybase_ct/tests test.inc Log: - Changed error_reporting setting to E_ALL so we get the notices http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test.inc?r1=1.2r2=1.3ty=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.2 php-src/ext/sybase_ct/tests/test.inc:1.3 --- php-src/ext/sybase_ct/tests/test.inc:1.2 Sun Feb 8 18:58:46 2004 +++ php-src/ext/sybase_ct/tests/test.inc Sun Feb 8 19:14:24 2004 @@ -1,9 +1,11 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.2 2004/02/08 23:58:46 thekid Exp $ + * $Id: test.inc,v 1.3 2004/02/09 00:14:24 thekid Exp $ */ + error_reporting(E_ALL); + // Change if needed define('HOST', ''); define('USER', ''); -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
On Mon, 2004-02-09 at 17:02, Marcus Boerger wrote: Hello Timm, you shouldn't set the error severity at all because the test system should already take care about it unless you overwrite it because you are checking some error levels. Can I be sure E_NOTICE is included? The reason I need this is that several test cases of mine include Notice: ... in their EXPECTF section. By setting the error reporting to E_ALL forcibly, I wanted to ensure notices being displayed. Btw.: $ find . -name '*.phpt' -exec grep -H 'error_reporting' {} \;|wc -l 98 - Timm -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
thekid Sun Feb 8 18:58:47 2004 EDT Modified files: /php-src/ext/sybase_ct/teststest.inc Log: - Made server name and credentials contain something obviously incorrect. - Made charset parameter default to iso_1 (fixed Sybase: Unable to update character set. warnings which were failing all tests when the official Sybase libraries were used - FreeTDS ignores this). http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test.inc?r1=1.1r2=1.2ty=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.1 php-src/ext/sybase_ct/tests/test.inc:1.2 --- php-src/ext/sybase_ct/tests/test.inc:1.1Fri Jan 23 21:18:13 2004 +++ php-src/ext/sybase_ct/tests/test.incSun Feb 8 18:58:46 2004 @@ -1,13 +1,13 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.1 2004/01/24 02:18:13 thekid Exp $ + * $Id: test.inc,v 1.2 2004/02/08 23:58:46 thekid Exp $ */ // Change if needed - define('HOST', 'php3'); - define('USER', 'news'); - define('PASSWORD', 'stuemper'); + define('HOST', ''); + define('USER', ''); + define('PASSWORD', ''); // {{{ bool sybase_msg_handler(int msgnumber, int severity, int state, int line, string text) // Handles server messages @@ -52,7 +52,7 @@ // Connect to the sybase server using the defines HOST, USER and PASSWORD function sybase_connect_ex($charset= NULL, $appname= NULL) { sybase_min_server_severity(11); // Suppress changed database context -if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset, $appname))) { +if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset ? $charset : 'iso_1', $appname))) { die('Connect to '.USER.'@'.HOST.' failed (using password: '.(PASSWORD ? 'yes' : 'no').')'); } return $db; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc
thekid Sun Feb 8 19:14:29 2004 EDT Modified files: /php-src/ext/sybase_ct/teststest.inc Log: - Changed error_reporting setting to E_ALL so we get the notices http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test.inc?r1=1.2r2=1.3ty=u Index: php-src/ext/sybase_ct/tests/test.inc diff -u php-src/ext/sybase_ct/tests/test.inc:1.2 php-src/ext/sybase_ct/tests/test.inc:1.3 --- php-src/ext/sybase_ct/tests/test.inc:1.2Sun Feb 8 18:58:46 2004 +++ php-src/ext/sybase_ct/tests/test.incSun Feb 8 19:14:24 2004 @@ -1,9 +1,11 @@ ?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test.inc,v 1.2 2004/02/08 23:58:46 thekid Exp $ + * $Id: test.inc,v 1.3 2004/02/09 00:14:24 thekid Exp $ */ + error_reporting(E_ALL); + // Change if needed define('HOST', ''); define('USER', ''); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php