From: Reini U. <ru...@us...> - 2004-11-03 16:47:21
|
Update of /cvsroot/phpwiki/phpwiki/tests/unit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17986/unit Modified Files: test.php Log Message: some unit tests fixes and updates Index: test.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/tests/unit/test.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -2 -b -p -d -r1.25 -r1.26 --- test.php 21 Oct 2004 21:59:08 -0000 1.25 +++ test.php 3 Nov 2004 16:47:10 -0000 1.26 @@ -241,5 +241,5 @@ function printConstant($v) { #################################################################### -# lib/config.php might do a cwd() +ob_start(); if (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) @@ -255,6 +255,9 @@ $user_level = 1; // BOGO (conflicts wit // use argv (from cli) or tests (from browser) params to run only certain tests // avoid pear: Console::Getopt -$alltests = array('InlineParserTest','HtmlParserTest','PageListTest','ListPagesTest', - 'SetupWiki','DumpHtml','AllPagesTest','AllUsersTest','OrphanedPagesTest'); +$alltests = array('InlineParserTest','HtmlParserTest', + 'PageListTest','ListPagesTest', + 'SetupWiki', + 'AllPagesTest','AllUsersTest','OrphanedPagesTest', + 'DumpHtml'); if (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) { $argv = array(); @@ -331,4 +334,5 @@ define('PHPWIKI_NOMAIN', true); require_once $rootdir.'index.php'; require_once $rootdir.'lib/main.php'; +ob_end_flush(); if ($debug_level & 1) { @@ -441,4 +445,5 @@ foreach ($database_backends as $dbtype) foreach ($alltests as $test) { + if (!@ob_get_level()) ob_start(); $suite = new PHPUnit_TestSuite("phpwiki"); if (file_exists(dirname(__FILE__).'/lib/'.$test.'.php')) @@ -451,5 +456,5 @@ foreach ($database_backends as $dbtype) $result = PHPUnit::run($suite); echo "ran " . $result->runCount() . " tests, " . $result->failureCount() . " failures.\n"; - flush(); + ob_end_flush(); if ($result->failureCount() > 0) { echo "More detail:\n"; @@ -459,4 +464,7 @@ foreach ($database_backends as $dbtype) $request->chunkOutput(); + $request->_dbi->close(); + unset($request->_user); + unset($request->_dbi); unset($request); unset($suite); |