mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 06:37:56 -04:00
disable error handler while running phpunit
This commit is contained in:
parent
86f4126d2c
commit
77369d8164
2 changed files with 8 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue