N°9567 - Extension Mgmt : Run setup

This commit is contained in:
odain
2026-05-19 10:46:56 +02:00
parent 908e11d507
commit 1ab035ffaa
6 changed files with 349 additions and 74 deletions

View File

@@ -1392,11 +1392,15 @@ HTML,
$this->assertEquals($sExpectedHTML, $oPage->sContent);
}
public function testGetSetupComponentsFromExtensions()
public function testGetSelectedComponents()
{
$aParams = new XMLParameters(__DIR__.'/ressources/installation_330.xml');
$aSteps = $aParams->Get('steps', []);
$aSelectedExtensions = ["itop-config-mgmt-core","itop-config-mgmt-datacenter","itop-config-mgmt-end-user","itop-config-mgmt-storage","itop-config-mgmt-virtualization","itop-container-mgmt","itop-service-mgmt-enterprise","itop-ticket-mgmt-simple-ticket","itop-ticket-mgmt-simple-ticket-enhanced-portal","itop-change-mgmt-simple","itop-kown-error-mgmt","itop-problem-mgmt","combodo-oauth2-client","combodo-mfa-extended","combodo-data-replication","combodo-api-playground","combodo-snapshot"];
$aExpected = json_decode('[{"_0":"_0","_1":"_1","_2":"_2","_3":"_3","_4":"_4","_4_0":"_4_0"},{"_0":"_0"},{"_0":"_0","_0_0":"_0_0"},{"_0":"_0"},{"_0":"_0","_1":"_1"},{"_0":"_0","_1":"_1","_3":"_3","_4":"_4","_5":"_5"}]', true);
// $this->assertEquals($aExpected, \WizStepModulesChoice::GetSetupComponentsFromExtensions($aSelectedExtensions));
$this->assertTrue(true);
$aRes = $this->oStep->GetSelectedComponents($aSteps, json_encode($aSelectedExtensions));
$aExpected = json_decode('[{"_0":"_0","_1":"_1","_2":"_2","_3":"_3","_4":"_4","_4_0":"_4_0"},{"_0":"_0"},{"_0":"_0","_0_0":"_0_0"},{"_0":"_0"},{"_0":"_0","_1":"_1"}]', true);
$this->assertEquals($aExpected, $aRes);
}
}