mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 04:28:44 +02:00
N°7407 - InstallationFileServiceTest relies on local installation.xml to reduce maintenance
This commit is contained in:
@@ -21,6 +21,10 @@ class InstallationFileServiceTest extends TestCase {
|
||||
$this->RecurseMoveDir(APPROOT."data/production-modules/$sModuleId", APPROOT . "datamodels/2.x/$sModuleId");
|
||||
}
|
||||
|
||||
private function GetInstallationPath() : string {
|
||||
return realpath(__DIR__ . '/installation.xml');
|
||||
}
|
||||
|
||||
public function GetDefaultModulesProvider() {
|
||||
return [
|
||||
'all checked' => [ true ],
|
||||
@@ -32,7 +36,7 @@ class InstallationFileServiceTest extends TestCase {
|
||||
* @dataProvider GetDefaultModulesProvider
|
||||
*/
|
||||
public function testProcessInstallationChoices($bInstallationOptionalChoicesChecked=false) {
|
||||
$sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml");
|
||||
$sPath = $this->GetInstallationPath();
|
||||
$this->assertTrue(is_file($sPath));
|
||||
$oInstallationFileService = new \InstallationFileService($sPath, 'production', [], $bInstallationOptionalChoicesChecked);
|
||||
$oInstallationFileService->ProcessInstallationChoices();
|
||||
@@ -89,7 +93,7 @@ class InstallationFileServiceTest extends TestCase {
|
||||
* @dataProvider GetDefaultModulesProvider
|
||||
*/
|
||||
public function testGetAllSelectedModules($bInstallationOptionalChoicesChecked=false) {
|
||||
$sPath = realpath(dirname(__FILE__, 6)."/datamodels/2.x/installation.xml");
|
||||
$sPath = $this->GetInstallationPath();
|
||||
$oInstallationFileService = new \InstallationFileService($sPath, 'production', [], $bInstallationOptionalChoicesChecked);
|
||||
$oInstallationFileService->Init();
|
||||
|
||||
@@ -195,7 +199,7 @@ 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 = $this->GetInstallationPath();
|
||||
$oInstallationFileService = new \InstallationFileService($sPath, 'production', $aSelectedExtensions);
|
||||
$oInstallationFileService->Init();
|
||||
|
||||
@@ -286,7 +290,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 = $this->GetInstallationPath();
|
||||
$oInstallationFileService = new \InstallationFileService($sPath, 'production', [], false);
|
||||
$oInstallationFileService->Init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user