Merge remote-tracking branch 'origin/support/3.1' into develop

# Conflicts:
#	approot.inc.php
#	datamodels/2.x/authent-cas/module.authent-cas.php
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/combodo-backoffice-darkmoon-theme/module.combodo-backoffice-darkmoon-theme.php
#	datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php
#	datamodels/2.x/itop-attachments/module.itop-attachments.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-cmdb-services/module.itop-bridge-cmdb-services.php
#	datamodels/2.x/itop-bridge-cmdb-ticket/module.itop-bridge-cmdb-ticket.php
#	datamodels/2.x/itop-bridge-datacenter-mgmt-services/module.itop-bridge-datacenter-mgmt-services.php
#	datamodels/2.x/itop-bridge-endusers-devices-services/module.itop-bridge-endusers-devices-services.php
#	datamodels/2.x/itop-bridge-storage-mgmt-services/module.itop-bridge-storage-mgmt-services.php
#	datamodels/2.x/itop-bridge-virtualization-mgmt-services/module.itop-bridge-virtualization-mgmt-services.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-core-update/module.itop-core-update.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-faq-light/module.itop-faq-light.php
#	datamodels/2.x/itop-files-information/module.itop-files-information.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-structure/module.itop-structure.php
#	datamodels/2.x/itop-themes-compat/module.itop-themes-compat.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
This commit is contained in:
Molkobain
2023-11-29 08:41:29 +01:00
2 changed files with 16 additions and 10 deletions

View File

@@ -19,8 +19,11 @@ class EMailTest extends ItopTestCase {
{
$oConfig = utils::GetConfig();
$sCurrentEmailTransport = $oConfig->Get('email_transport');
// Set our email transport to file so we can read it after
$sCurrentEmailAsync = $oConfig->Get('email_asynchronous');
// Set our email transport to file, so we can read it after
$oConfig->Set('email_transport', 'LogFile');
$oConfig->Set('email_asynchronous', false);
$oEmail = new Email();
$oEmail->SetRecipientTO('email@email.com');
@@ -40,5 +43,6 @@ class EMailTest extends ItopTestCase {
// Set our previous email transport value back, so it doesn't affect other tests
$oConfig->Set('email_transport', $sCurrentEmailTransport);
$oConfig->Set('email_asynchronous', $sCurrentEmailAsync);
}
}

View File

@@ -23,6 +23,8 @@ require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
class ExceptionLogTest extends ItopDataTestCase
{
const USE_TRANSACTION = false;
protected function setUp(): void
{
require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
@@ -122,13 +124,13 @@ class ExceptionLogTest extends ItopDataTestCase
'logLevelMinWriteInDb' => ['Exception' => 'Debug'],
],
'flat configuration' => [
'aLevels' => ['Debug'],
'aLevels' => ['Error'],
'aExceptions' => [\GrandChildException::class],
'sChannel' => 'GrandChildException',
'aExpectedWriteNumber' => [1],
'logLevelMin' => 'Debug',
'logLevelMin' => 'Error',
'iExpectedDbWriteNumber' => [1],
'logLevelMinWriteInDb' => 'Debug',
'logLevelMinWriteInDb' => 'Error',
],
'Default conf has expected levels' => [
'aLevels' => ['Debug', 'Warning'],
@@ -203,22 +205,22 @@ class ExceptionLogTest extends ItopDataTestCase
'logLevelMinWriteInDb' => null,
],
'Simple Error (testing Throwable signature)' => [
'aLevels' => ['Debug'],
'aLevels' => ['Error'],
'aExceptions' => [\Error::class],
'sChannel' => 'Error',
'aExpectedWriteNumber' => [1],
'logLevelMin' => 'Debug',
'logLevelMin' => 'Error',
'iExpectedDbWriteNumber' => [1],
'logLevelMinWriteInDb' => 'Debug',
'logLevelMinWriteInDb' => 'Error',
],
"use '' to enable all" => [
'aLevels' => ['Debug'],
'aLevels' => ['Error'],
'aExceptions' => [\GrandChildException::class, \Exception::class],
'sChannel' => 'GrandChildException',
'aExpectedWriteNumber' => [1, 1],
'logLevelMin' => ['' => 'Debug'],
'logLevelMin' => ['' => 'Error'],
'iExpectedDbWriteNumber' => [1, 1],
'logLevelMinWriteInDb' => ['' => 'Debug'],
'logLevelMinWriteInDb' => ['' => 'Error'],
],
];
}