mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 08:42:17 +02:00
N°9567 - fix back to setup from extension management - extension screen missing when back after audit
N°9567 - fix again
This commit is contained in:
@@ -175,7 +175,9 @@ class WizStepModulesChoice extends AbstractWizStepInstall
|
|||||||
["class" => "WizStepUpgradeMiscParams","state" => ""],
|
["class" => "WizStepUpgradeMiscParams","state" => ""],
|
||||||
];
|
];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
$this->aSteps = null;
|
||||||
while (null != $this->GetStepInfo($i)) {
|
while (null != $this->GetStepInfo($i)) {
|
||||||
|
$this->aSteps = null;
|
||||||
$aSteps [] = ["class" => "WizStepModulesChoice","state" => "$i"];
|
$aSteps [] = ["class" => "WizStepModulesChoice","state" => "$i"];
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@@ -709,7 +711,6 @@ EOF
|
|||||||
// Found an "installation.xml" file, let's use this definition for the wizard
|
// Found an "installation.xml" file, let's use this definition for the wizard
|
||||||
$aParams = new XMLParameters($this->GetSourceFilePath());
|
$aParams = new XMLParameters($this->GetSourceFilePath());
|
||||||
$this->aSteps = $aParams->Get('steps', []);
|
$this->aSteps = $aParams->Get('steps', []);
|
||||||
|
|
||||||
if ($index + 1 >= count($this->aSteps)) {
|
if ($index + 1 >= count($this->aSteps)) {
|
||||||
//make sure we also cache next step as well
|
//make sure we also cache next step as well
|
||||||
$aOptions = $this->oExtensionsMap->GetAllExtensionsOptionInfo($bRemoteExtensionsShouldBeMandatory);
|
$aOptions = $this->oExtensionsMap->GetAllExtensionsOptionInfo($bRemoteExtensionsShouldBeMandatory);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
|
|||||||
use iTopExtensionsMap;
|
use iTopExtensionsMap;
|
||||||
use iTopExtensionsMapFake;
|
use iTopExtensionsMapFake;
|
||||||
use ModuleDiscovery;
|
use ModuleDiscovery;
|
||||||
use WepPageFake;
|
|
||||||
use WizardController;
|
use WizardController;
|
||||||
use WizStepModulesChoiceFake;
|
use WizStepModulesChoiceFake;
|
||||||
use XMLParameters;
|
use XMLParameters;
|
||||||
@@ -1431,4 +1430,25 @@ HTML,
|
|||||||
}
|
}
|
||||||
$this->assertEquals($expected, $this->oWizStepModulesChoiceFake->GetWizardSteps());
|
$this->assertEquals($expected, $this->oWizStepModulesChoiceFake->GetWizardSteps());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetWizardStepsWithoutAnyExtension()
|
||||||
|
{
|
||||||
|
$this->oWizard->SetParameter('source_dir', __DIR__.'/ressources');
|
||||||
|
$oExtensionMap = $this->createMock(iTopExtensionsMap::class);
|
||||||
|
$oExtensionMap->expects(self::any())->method('GetAllExtensionsOptionInfo')->willReturn([]);
|
||||||
|
|
||||||
|
$this->oWizStepModulesChoiceFake->setExtensionMap($oExtensionMap);
|
||||||
|
|
||||||
|
$expected = [
|
||||||
|
["class" => "WizStepWelcome","state" => ""],
|
||||||
|
["class" => "WizStepInstallOrUpgrade","state" => ""],
|
||||||
|
["class" => "WizStepDetectedInfo","state" => ""],
|
||||||
|
["class" => "WizStepUpgradeMiscParams","state" => ""],
|
||||||
|
];
|
||||||
|
|
||||||
|
for ($i = 0;$i <= 4; $i++) {
|
||||||
|
$expected [] = ["class" => "WizStepModulesChoice","state" => "".$i];
|
||||||
|
}
|
||||||
|
$this->assertEquals($expected, $this->oWizStepModulesChoiceFake->GetWizardSteps());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user