cvs: php-src /ext/sybase_ct/tests test_msghandler.phpt

From: Date: Sun, 25 Jan 2004 20:04:08 +0000
Subject: cvs: php-src /ext/sybase_ct/tests test_msghandler.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-25855@lists.php.net to get a copy of this message
thekid Sun Jan 25 15:04:08 2004 EDT Modified files: /php-src/ext/sybase_ct/tests test_msghandler.phpt Log: - Added test for case when incorrect argument type is passed to sybase_set_message_handler() http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test_msghandler.phpt?r1=1.1&r2=1.2&ty=u Index: php-src/ext/sybase_ct/tests/test_msghandler.phpt diff -u php-src/ext/sybase_ct/tests/test_msghandler.phpt:1.1 php-src/ext/sybase_ct/tests/test_msghandler.phpt:1.2 --- php-src/ext/sybase_ct/tests/test_msghandler.phpt:1.1 Fri Jan 23 21:18:13 2004 +++ php-src/ext/sybase_ct/tests/test_msghandler.phpt Sun Jan 25 15:04:08 2004 @@ -6,7 +6,7 @@ <?php /* This file is part of PHP test framework for ext/sybase_ct * - * $Id: test_msghandler.phpt,v 1.1 2004/01/24 02:18:13 thekid Exp $ + * $Id: test_msghandler.phpt,v 1.2 2004/01/25 20:04:08 thekid Exp $ */ require('test.inc'); @@ -18,6 +18,7 @@ echo 'Instance method: '; sybase_set_messagehandler_ex(array(new sybase(), 'handler')); echo 'Lambda function: '; sybase_set_messagehandler_ex(create_function('', 'return FALSE;')); echo 'Unset: '; sybase_set_messagehandler_ex(NULL); + echo 'Incorrect type: '; sybase_set_messagehandler_ex(1); echo 'Function: '; sybase_set_messagehandler_ex('sybase_msg_handler'); var_dump(sybase_select_ex($db, 'select getdate(NULL)')); @@ -31,6 +32,9 @@ Instance method: bool(true) Lambda function: bool(true) Unset: bool(true) +Incorrect type: +Warning: sybase_set_message_handler(): First argumented is expected to be either NULL, an array or string, integer given in %s/test.inc on line %d +bool(false) Function: bool(true) >>> Query: select getdate(NULL) *** Caught Sybase Server Message #%d [Severity %d, state %d] at line %d

« previous php.cvs (#25855) next »