disable error handler while running phpunit

This commit is contained in:
Thomas Mueller 2013-01-31 22:05:06 +01:00
parent 86f4126d2c
commit 77369d8164
2 changed files with 8 additions and 3 deletions

View file

@ -402,9 +402,11 @@ class OC {
self::initPaths();
register_shutdown_function(array('OC_Log', 'onShutdown'));
set_error_handler(array('OC_Log', 'onError'));
set_exception_handler(array('OC_Log', 'onException'));
if (!defined('PHPUNIT_RUN')) {
register_shutdown_function(array('OC_Log', 'onShutdown'));
set_error_handler(array('OC_Log', 'onError'));
set_exception_handler(array('OC_Log', 'onException'));
}
// set debug mode if an xdebug session is active
if (!defined('DEBUG') || !DEBUG) {

View file

@ -2,6 +2,9 @@
global $RUNTIME_NOAPPS;
$RUNTIME_NOAPPS = true;
define('PHPUNIT_RUN', 1);
require_once __DIR__.'/../lib/base.php';
if(!class_exists('PHPUnit_Framework_TestCase')) {