N°7407 - adapt unattended test to 3.0 installation.xml choices

This commit is contained in:
odain
2024-04-09 10:46:37 +02:00
parent 6a30d6caa9
commit f14b4c32be

View File

@@ -35,6 +35,9 @@ class InstallationFileServiceTest extends TestCase {
$oInstallationFileService = new \InstallationFileService($sPath, 'production', [], $bInstallationOptionalChoicesChecked);
$oInstallationFileService->ProcessInstallationChoices();
$aExpectedModules = [
'combodo-backoffice-darkmoon-theme',
'itop-structure',
'itop-themes-compat',
"itop-config-mgmt",
"itop-attachments",
"itop-profiles-itil",
@@ -66,9 +69,11 @@ class InstallationFileServiceTest extends TestCase {
if ($bInstallationOptionalChoicesChecked){
$aExpectedModules []= "itop-problem-mgmt";
$aExpectedModules []= "itop-knownerror-mgmt";
$aExpectedModules []= "itop-faq-light";
} else {
$aExpectedUnselectedModules []= "itop-problem-mgmt";
$aExpectedUnselectedModules []= "itop-knownerror-mgmt";
$aExpectedUnselectedModules []= "itop-faq-light";
}
sort($aExpectedModules);
@@ -93,6 +98,9 @@ class InstallationFileServiceTest extends TestCase {
$aSelectedModules = $oInstallationFileService->GetSelectedModules();
$aExpectedInstallationModules = [
'combodo-backoffice-darkmoon-theme',
'itop-structure',
'itop-themes-compat',
"itop-config-mgmt",
"itop-attachments",
"itop-profiles-itil",
@@ -116,6 +124,7 @@ class InstallationFileServiceTest extends TestCase {
if ($bInstallationOptionalChoicesChecked){
$aExpectedInstallationModules []= "itop-problem-mgmt";
$aExpectedInstallationModules []= "itop-knownerror-mgmt";
$aExpectedInstallationModules []= "itop-faq-light";
}
$aExpectedAuthenticationModules = [
@@ -133,6 +142,7 @@ class InstallationFileServiceTest extends TestCase {
$aAutoSelectedModules = [
'itop-bridge-virtualization-storage',
'itop-bridge-cmdb-ticket',
];
$this->checkModuleList("installation.xml choices", $aExpectedInstallationModules, $aSelectedModules);
@@ -199,6 +209,9 @@ class InstallationFileServiceTest extends TestCase {
$aSelectedModules = $oInstallationFileService->GetSelectedModules();
$aExpectedInstallationModules = [
'combodo-backoffice-darkmoon-theme',
'itop-structure',
'itop-themes-compat',
"itop-config-mgmt",
"itop-attachments",
"itop-profiles-itil",
@@ -223,6 +236,7 @@ class InstallationFileServiceTest extends TestCase {
];
if ($bKnownMgtSelected){
$aExpectedInstallationModules []= "itop-knownerror-mgmt";
$aExpectedInstallationModules []= "itop-faq-light";
}
$aExpectedAuthenticationModules = [
@@ -240,6 +254,7 @@ class InstallationFileServiceTest extends TestCase {
$aAutoSelectedModules = [
'itop-bridge-virtualization-storage',
'itop-bridge-cmdb-ticket',
];
$this->checkModuleList("installation.xml choices", $aExpectedInstallationModules, $aSelectedModules);