Skip to content
Snippets Groups Projects
Commit d589869a authored by Robin Appelman's avatar Robin Appelman
Browse files

disable log when running tests

parent 6f3e039e
Branches
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ class OC_Log {
const ERROR=3;
const FATAL=4;
static public $enabled = true;
static protected $class = null;
/**
......@@ -29,6 +30,7 @@ class OC_Log {
* @param int level
*/
public static function write($app, $message, $level) {
if (self::$enabled) {
if (!self::$class) {
self::$class = 'OC_Log_'.ucfirst(OC_Config::getValue('log_type', 'owncloud'));
call_user_func(array(self::$class, 'init'));
......@@ -37,3 +39,4 @@ class OC_Log {
$log_class::write($app, $message, $level);
}
}
}
......@@ -26,3 +26,4 @@ abstract class UnitTestCase extends PHPUnit_Framework_TestCase{
}
OC_Hook::clear();
OC_Log::$enabled = false;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment