diff --git a/tests/php-unit-tests/unitary-tests/setup/unattended-install/InstallationFileServiceTest.php b/tests/php-unit-tests/unitary-tests/setup/unattended-install/InstallationFileServiceTest.php index f95142f96..857ab24b3 100644 --- a/tests/php-unit-tests/unitary-tests/setup/unattended-install/InstallationFileServiceTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/unattended-install/InstallationFileServiceTest.php @@ -21,6 +21,10 @@ class InstallationFileServiceTest extends TestCase { $this->RecurseMoveDir(APPROOT."data/production-modules/$sModuleId", APPROOT . "datamodels/2.x/$sModuleId"); } + private function GetInstallationPath() { + return realpath(__DIR__ . '/installation.xml'); + } + public function GetDefaultModulesProvider() { return [ 'all checked' => [ true ], @@ -32,17 +36,11 @@ class InstallationFileServiceTest extends TestCase { * @dataProvider GetDefaultModulesProvider */ public function testProcessInstallationChoices($bInstallationOptionalChoicesChecked=false) { - $sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml"); + $sPath = realpath($this->GetInstallationPath()); $this->assertTrue(is_file($sPath)); $oInstallationFileService = new \InstallationFileService($sPath, 'production', [], $bInstallationOptionalChoicesChecked); $oInstallationFileService->ProcessInstallationChoices(); $aExpectedModules = [ - 'combodo-backoffice-darkmoon-theme', - 'combodo-backoffice-fullmoon-high-contrast-theme', - 'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme', - 'combodo-backoffice-fullmoon-tritanopia-theme', - 'itop-structure', - 'itop-themes-compat', "itop-config-mgmt", "itop-attachments", "itop-profiles-itil", @@ -74,11 +72,9 @@ 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); @@ -97,18 +93,14 @@ class InstallationFileServiceTest extends TestCase { * @dataProvider GetDefaultModulesProvider */ public function testGetAllSelectedModules($bInstallationOptionalChoicesChecked=false) { - $sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml"); + $sPath = realpath($this->GetInstallationPath()); $oInstallationFileService = new \InstallationFileService($sPath, 'production', [], $bInstallationOptionalChoicesChecked); $oInstallationFileService->Init(); $aSelectedModules = $oInstallationFileService->GetSelectedModules(); $aExpectedInstallationModules = [ 'combodo-backoffice-darkmoon-theme', - 'combodo-backoffice-fullmoon-high-contrast-theme', - 'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme', - 'combodo-backoffice-fullmoon-tritanopia-theme', - 'itop-structure', - 'itop-themes-compat', + 'itop-structure', "itop-config-mgmt", "itop-attachments", "itop-profiles-itil", @@ -132,7 +124,6 @@ class InstallationFileServiceTest extends TestCase { if ($bInstallationOptionalChoicesChecked){ $aExpectedInstallationModules []= "itop-problem-mgmt"; $aExpectedInstallationModules []= "itop-knownerror-mgmt"; - $aExpectedInstallationModules []= "itop-faq-light"; } $aExpectedAuthenticationModules = [ @@ -216,18 +207,14 @@ class InstallationFileServiceTest extends TestCase { * @dataProvider ItilExtensionProvider */ public function testGetAllSelectedModules_withItilExtensions(array $aSelectedExtensions, bool $bKnownMgtSelected) { - $sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml"); + $sPath = realpath($this->GetInstallationPath()); $oInstallationFileService = new \InstallationFileService($sPath, 'production', $aSelectedExtensions); $oInstallationFileService->Init(); $aSelectedModules = $oInstallationFileService->GetSelectedModules(); $aExpectedInstallationModules = [ 'combodo-backoffice-darkmoon-theme', - 'combodo-backoffice-fullmoon-high-contrast-theme', - 'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme', - 'combodo-backoffice-fullmoon-tritanopia-theme', - 'itop-structure', - 'itop-themes-compat', + 'itop-structure', "itop-config-mgmt", "itop-attachments", "itop-profiles-itil", @@ -252,7 +239,6 @@ class InstallationFileServiceTest extends TestCase { ]; if ($bKnownMgtSelected){ $aExpectedInstallationModules []= "itop-knownerror-mgmt"; - $aExpectedInstallationModules []= "itop-faq-light"; } $aExpectedAuthenticationModules = [ @@ -320,7 +306,7 @@ class InstallationFileServiceTest extends TestCase { $this->RecurseMoveDir(APPROOT . "datamodels/2.x/$sModuleId", APPROOT."data/production-modules/$sModuleId"); } - $sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml"); + $sPath = realpath($this->GetInstallationPath()); $oInstallationFileService = new \InstallationFileService($sPath, 'production', [], false); $oInstallationFileService->Init(); diff --git a/tests/php-unit-tests/unitary-tests/setup/unattended-install/installation.xml b/tests/php-unit-tests/unitary-tests/setup/unattended-install/installation.xml new file mode 100644 index 000000000..89f2a212e --- /dev/null +++ b/tests/php-unit-tests/unitary-tests/setup/unattended-install/installation.xml @@ -0,0 +1,216 @@ + + + + + Configuration Management options + The options below allow you to configure the type of elements that are to be managed inside iTop.]]> + /images/modules.png + + + itop-config-mgmt-core + Configuration Management Core + All the base objects that are mandatory in the iTop CMDB: Organizations, Locations, Teams, Persons, etc. + + itop-config-mgmt + itop-attachments + itop-profiles-itil + itop-welcome-itil + itop-tickets + itop-files-information + combodo-db-tools + itop-core-update + itop-hub-connector + itop-oauth-client + + true + + + itop-config-mgmt-datacenter + Data Center Devices + Manage Data Center devices such as Racks, Enclosures, PDUs, etc. + + itop-datacenter-mgmt + + true + + + itop-config-mgmt-end-user + End-User Devices + Manage devices related to end-users: PCs, Phones, Tablets, etc. + + itop-endusers-devices + + true + + + itop-config-mgmt-storage + Storage Devices + Manage storage devices such as NAS, SAN Switches, Tape Libraries and Tapes, etc. + + itop-storage-mgmt + + true + + + itop-config-mgmt-virtualization + Virtualization + Manage Hypervisors, Virtual Machines and Farms. + + itop-virtualization-mgmt + + true + + + + + Service Management options + Select the choice that best describes the relationships between the services and the IT infrastructure in your IT environment.]]> + ./wizard-icons/service.png + + + itop-service-mgmt-enterprise + Service Management for Enterprises + Select this option if the IT delivers services based on a shared infrastructure. For example if different organizations within your company subscribe to services (like Mail and Print services) delivered by a single shared backend. + + itop-service-mgmt + + true + + + itop-service-mgmt-service-provider + Service Management for Service Providers + Select this option if the IT manages the infrastructure of independent customers. This is the most flexible model, since the services can be delivered with a mix of shared and customer specific infrastructure devices. + + itop-service-mgmt-provider + + + + + + Tickets Management options + Select the type of tickets you want to use in order to respond to user requests and incidents.]]> + ./itop-incident-mgmt-itil/images/incident-escalated.png + + + itop-ticket-mgmt-simple-ticket + Simple Ticket Management + Select this option to use one single type of tickets for all kind of requests. + + itop-request-mgmt + + true + + + + itop-ticket-mgmt-simple-ticket-enhanced-portal + Customer Portal + + + itop-portal + itop-portal-base + + true + + + + + + itop-ticket-mgmt-itil + ITIL Compliant Tickets Management + Select this option to have different types of ticket for managing user requests and incidents. Each type of ticket has a specific life cycle and specific fields + + + + itop-ticket-mgmt-itil-user-request + User Request Management + Manage User Request tickets in iTop + + itop-request-mgmt-itil + + + + itop-ticket-mgmt-itil-incident + Incident Management + Manage Incidents tickets in iTop + + itop-incident-mgmt-itil + + + + itop-ticket-mgmt-itil-enhanced-portal + Customer Portal + + + itop-portal + itop-portal-base + + true + + + + + + itop-ticket-mgmt-none + No Tickets Management + Don't manage incidents or user requests in iTop + + + + + + + Change Management options + Select the type of tickets you want to use in order to manage changes to the IT infrastructure.]]> + ./itop-change-mgmt/images/change.png + + + itop-change-mgmt-simple + Simple Change Management + Select this option to use one type of ticket for all kind of changes. + + itop-change-mgmt + + true + + + itop-change-mgmt-itil + ITIL Change Management + Select this option to use Normal/Routine/Emergency change tickets. + + itop-change-mgmt-itil + + + + itop-change-mgmt-none + No Change Management + Don't manage changes in iTop + + + + + + + Additional ITIL tickets + Pick from the list below the additional ITIL processes that are to be implemented in iTop.]]> + ./itop-knownerror-mgmt/images/known-error.png + + + itop-kown-error-mgmt + Known Errors Management + Select this option to track "Known Errors" and FAQs in iTop. + + itop-knownerror-mgmt + + + + itop-problem-mgmt + Problem Management + Select this option track "Problems" in iTop. + + itop-problem-mgmt + + + + + +