mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
N°4261 - Fix CI and add a test case
This commit is contained in:
@@ -206,6 +206,15 @@ class ExceptionLogTest extends ItopDataTestCase
|
||||
'iExpectedDbWriteNumber' => [1],
|
||||
'logLevelMinWriteInDb' => 'Debug',
|
||||
],
|
||||
"use '' to enable all" => [
|
||||
'aLevels' => ['Debug'],
|
||||
'aExceptions' => [\GrandChildException::class, \Exception::class],
|
||||
'sChannel' => 'GrandChildException',
|
||||
'aExpectedWriteNumber' => [1, 1],
|
||||
'logLevelMin' => ['' => 'Debug'],
|
||||
'iExpectedDbWriteNumber' => [1, 1],
|
||||
'logLevelMinWriteInDb' => ['' => 'Debug'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -273,7 +282,7 @@ class ExceptionLogTest extends ItopDataTestCase
|
||||
$resultFile = $this->InvokeNonPublicStaticMethod(\ExceptionLog::class, 'GetLevelDefault', [\ExceptionLog::ENUM_CONFIG_PARAM_FILE]);
|
||||
$resultFilePerDefaultWhenKeyNotFound = $this->InvokeNonPublicStaticMethod(\ExceptionLog::class, 'GetLevelDefault', ['foo']);
|
||||
|
||||
$this->assertEquals('Error', $resultDb);
|
||||
$this->assertEquals(false, $resultDb);
|
||||
$this->assertEquals('Ok', $resultFile);
|
||||
$this->assertEquals('Ok', $resultFilePerDefaultWhenKeyNotFound);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user