mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°6228 - ✅ Fix Unit tests due to logs added in CRUD
This commit is contained in:
@@ -23,6 +23,8 @@ require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
|
|||||||
|
|
||||||
class ExceptionLogTest extends ItopDataTestCase
|
class ExceptionLogTest extends ItopDataTestCase
|
||||||
{
|
{
|
||||||
|
const USE_TRANSACTION = false;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
|
require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
|
||||||
@@ -122,13 +124,13 @@ class ExceptionLogTest extends ItopDataTestCase
|
|||||||
'logLevelMinWriteInDb' => ['Exception' => 'Debug'],
|
'logLevelMinWriteInDb' => ['Exception' => 'Debug'],
|
||||||
],
|
],
|
||||||
'flat configuration' => [
|
'flat configuration' => [
|
||||||
'aLevels' => ['Debug'],
|
'aLevels' => ['Error'],
|
||||||
'aExceptions' => [\GrandChildException::class],
|
'aExceptions' => [\GrandChildException::class],
|
||||||
'sChannel' => 'GrandChildException',
|
'sChannel' => 'GrandChildException',
|
||||||
'aExpectedWriteNumber' => [1],
|
'aExpectedWriteNumber' => [1],
|
||||||
'logLevelMin' => 'Debug',
|
'logLevelMin' => 'Error',
|
||||||
'iExpectedDbWriteNumber' => [1],
|
'iExpectedDbWriteNumber' => [1],
|
||||||
'logLevelMinWriteInDb' => 'Debug',
|
'logLevelMinWriteInDb' => 'Error',
|
||||||
],
|
],
|
||||||
'Default conf has expected levels' => [
|
'Default conf has expected levels' => [
|
||||||
'aLevels' => ['Debug', 'Warning'],
|
'aLevels' => ['Debug', 'Warning'],
|
||||||
@@ -203,22 +205,22 @@ class ExceptionLogTest extends ItopDataTestCase
|
|||||||
'logLevelMinWriteInDb' => null,
|
'logLevelMinWriteInDb' => null,
|
||||||
],
|
],
|
||||||
'Simple Error (testing Throwable signature)' => [
|
'Simple Error (testing Throwable signature)' => [
|
||||||
'aLevels' => ['Debug'],
|
'aLevels' => ['Error'],
|
||||||
'aExceptions' => [\Error::class],
|
'aExceptions' => [\Error::class],
|
||||||
'sChannel' => 'Error',
|
'sChannel' => 'Error',
|
||||||
'aExpectedWriteNumber' => [1],
|
'aExpectedWriteNumber' => [1],
|
||||||
'logLevelMin' => 'Debug',
|
'logLevelMin' => 'Error',
|
||||||
'iExpectedDbWriteNumber' => [1],
|
'iExpectedDbWriteNumber' => [1],
|
||||||
'logLevelMinWriteInDb' => 'Debug',
|
'logLevelMinWriteInDb' => 'Error',
|
||||||
],
|
],
|
||||||
"use '' to enable all" => [
|
"use '' to enable all" => [
|
||||||
'aLevels' => ['Debug'],
|
'aLevels' => ['Error'],
|
||||||
'aExceptions' => [\GrandChildException::class, \Exception::class],
|
'aExceptions' => [\GrandChildException::class, \Exception::class],
|
||||||
'sChannel' => 'GrandChildException',
|
'sChannel' => 'GrandChildException',
|
||||||
'aExpectedWriteNumber' => [1, 1],
|
'aExpectedWriteNumber' => [1, 1],
|
||||||
'logLevelMin' => ['' => 'Debug'],
|
'logLevelMin' => ['' => 'Error'],
|
||||||
'iExpectedDbWriteNumber' => [1, 1],
|
'iExpectedDbWriteNumber' => [1, 1],
|
||||||
'logLevelMinWriteInDb' => ['' => 'Debug'],
|
'logLevelMinWriteInDb' => ['' => 'Error'],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user