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) {
global $RUNTIME_NOAPPS;
$RUNTIME_NOAPPS = true;
+
+define('PHPUNIT_RUN', 1);
+
require_once __DIR__.'/../lib/base.php';
if(!class_exists('PHPUnit_Framework_TestCase')) {