mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°3002 Get developer_mode.enabled config param first normally, and if not set from disk
This commit is contained in:
@@ -16,9 +16,7 @@
|
||||
namespace Combodo\iTop\Test\UnitTest\Core\Log;
|
||||
|
||||
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
use DeprecatedCallsLog;
|
||||
use ExceptionLog;
|
||||
use LogAPI;
|
||||
use MetaModel;
|
||||
|
||||
|
||||
@@ -32,18 +30,10 @@ class ExceptionLogTest extends ItopDataTestCase
|
||||
parent::setUp();
|
||||
|
||||
// We are using PHPUnit\Framework\MockObject\Generator::generateMock that is throwing notice !
|
||||
// Changing the log config so that those won't be caught by \DeprecatedCallsLog::DeprecatedNoticesErrorHandler
|
||||
// Changing config so that those won't be caught by \DeprecatedCallsLog::DeprecatedNoticesErrorHandler
|
||||
// disabling devenv is easier than changing log config O:)
|
||||
$oConfig = MetaModel::GetConfig();
|
||||
$mLogLevelMin = $oConfig->Get('log_level_min');
|
||||
if (is_string($mLogLevelMin)) {
|
||||
$aLogLevelMin[''] = $mLogLevelMin;
|
||||
} else if (is_array($mLogLevelMin)) {
|
||||
$aLogLevelMin = $mLogLevelMin;
|
||||
} else {
|
||||
$aLogLevelMin = [];
|
||||
}
|
||||
$aLogLevelMin[DeprecatedCallsLog::ENUM_CHANNEL_PHP_LIBMETHOD] = LogAPI::LEVEL_ERROR;
|
||||
$oConfig->Set('log_level_min', $aLogLevelMin);
|
||||
$oConfig->Set('developer_mode.enabled', false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user