cvs: pear(MDB_1) /MDB/tests clitest.php test.php

From: Date: Tue, 23 Sep 2003 12:52:59 +0000
Subject: cvs: pear(MDB_1) /MDB/tests clitest.php test.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13010@lists.php.net to get a copy of this message
lsmith Tue Sep 23 08:52:59 2003 EDT Modified files: (Branch: MDB_1) /pear/MDB/tests test.php clitest.php Log: - sett eorr handler to find sneaky hidden errors Index: pear/MDB/tests/test.php diff -u pear/MDB/tests/test.php:1.19 pear/MDB/tests/test.php:1.19.4.1 --- pear/MDB/tests/test.php:1.19 Tue May 13 17:14:36 2003 +++ pear/MDB/tests/test.php Tue Sep 23 08:52:59 2003 @@ -41,7 +41,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: test.php,v 1.19 2003/05/13 21:14:36 lsmith Exp $ +// $Id: test.php,v 1.19.4.1 2003/09/23 12:52:59 lsmith Exp $ /* This is a small test suite for MDB using PHPUnit @@ -62,6 +62,14 @@ require_once('testUtils.php'); require_once('MDB.php'); require_once('HTML_TestListener.php'); + +PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error'); +function handle_pear_error ($error_obj) +{ + print '<pre><b>PEAR-Error</b><br />'; + echo $error_obj->getMessage().': '.$error_obj->getUserinfo(); + print '</pre>'; +} // you may need to uncomment the line and modify the multiplier as you see fit set_time_limit(60*count($dbarray)); Index: pear/MDB/tests/clitest.php diff -u pear/MDB/tests/clitest.php:1.8 pear/MDB/tests/clitest.php:1.8.4.1 --- pear/MDB/tests/clitest.php:1.8 Sun Jun 1 10:28:21 2003 +++ pear/MDB/tests/clitest.php Tue Sep 23 08:52:59 2003 @@ -1,3 +1,4 @@ + <?php // +----------------------------------------------------------------------+ // | PHP Version 4 | @@ -41,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: clitest.php,v 1.8 2003/06/01 14:28:21 lsmith Exp $ +// $Id: clitest.php,v 1.8.4.1 2003/09/23 12:52:59 lsmith Exp $ /* This is a small test suite for MDB using PHPUnit @@ -75,6 +76,14 @@ MDB::loadFile('Manager'); MDB::loadFile('Date'); + +PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error'); +function handle_pear_error ($error_obj) +{ + print '<pre><b>PEAR-Error</b><br />'; + echo $error_obj->getMessage().': '.$error_obj->getUserinfo(); + print '</pre>'; +} foreach ($testcases as $testcase) { include_once($testcase.'.php');

« previous php.pear.cvs (#13010) next »