N°9567 - Extension Mgmt : Run setup

This commit is contained in:
Eric Espie
2026-05-19 17:15:09 +02:00
parent 52bc9fcf14
commit 8f6e194855
7 changed files with 37 additions and 24 deletions

View File

@@ -69,7 +69,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$aClasses = [ 'DFRToRemoveLeaf' ];
$oService = new DataCleanupService();
$aRes = $oService->ExecuteCleanup($aClasses, []);
$aRes = $oService->ExecuteCleanup($aClasses);
$aExpected = [
['DFRToUpdate', 1, 0 ],
['DFRToRemoveLeaf', 0, 1 ],
@@ -97,7 +97,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$aClasses = [ 'DFRToRemoveLeaf' ];
$oService = new DataCleanupService();
$aRes = $oService->ExecuteCleanup($aClasses, []);
$aRes = $oService->ExecuteCleanup($aClasses);
$aExpected = [
['DFRToUpdate', 3, 0 ],
['DFRToRemoveLeaf', 0, 3 ],
@@ -129,7 +129,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$aClasses = ['DFRToRemoveLeaf'];
$oService = new DataCleanupService();
$aExecutionSummary = $oService->ExecuteCleanup($aClasses, $aExecutionSummary);
$aExecutionSummary = $oService->ExecuteCleanup($aClasses);
$aExpected = [
['DFRToUpdate', 3, 0 ],
@@ -149,7 +149,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$aClasses = ['DFRToRemoveLeaf'];
$oService = new DataCleanupService();
$aExecutionSummary = $oService->ExecuteCleanup($aClasses, $aExecutionSummary);
$aExecutionSummary = $oService->ExecuteCleanup($aClasses);
$aExpected = [
['DFRToUpdate', 1, 0, 0, 4 ],
@@ -198,7 +198,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$this->expectException(DataFeatureRemovalException::class);
$this->expectExceptionMessage('Deletion Plan cannot be executed due to issues');
$oService = new DataCleanupService();
$oService->ExecuteCleanup($aClasses, []);
$oService->ExecuteCleanup($aClasses);
}
public function testGetCleanupSummary_ManualDeleteShouldFail()
@@ -310,7 +310,7 @@ class DataCleanupServiceTest extends ItopCustomDatamodelTestCase
$oDeletionPlaService = new DataCleanupService();
$this->GivenExecutionLimits($iExecutionCount);
$this->SetNonPublicProperty($oDeletionPlaService, 'oExecutionLimits', $this->oExecutionLimits);
$aRes = $oDeletionPlaService->ExecuteCleanup($aClasses, []);
$aRes = $oDeletionPlaService->ExecuteCleanup($aClasses);
$this->AssertSummaryEquals($aExpected, $aRes);
}