N°9567 - fix test

This commit is contained in:
odain
2026-05-11 17:00:26 +02:00
parent e2d8db077d
commit 7ced404935
2 changed files with 8 additions and 4 deletions

View File

@@ -159,7 +159,11 @@ class ExtensionsMapTest extends ItopTestCase
$sExpected = file_get_contents(__DIR__.'/ressources/all_extensions_from_datamodels.json'); $sExpected = file_get_contents(__DIR__.'/ressources/all_extensions_from_datamodels.json');
$sExpected = str_replace('"sVersion": "ITOP_VERSION"', '"sVersion": "'.ITOP_VERSION.'"', $sExpected); $sExpected = str_replace('"sVersion": "ITOP_VERSION"', '"sVersion": "'.ITOP_VERSION.'"', $sExpected);
$this->assertEquals($sExpected, json_encode($this->SerializeExtensionMap($oiTopExtensionsMap), JSON_PRETTY_PRINT)); $sExpected = preg_replace('/"module_file_path": .*/', '"module_file_path": ANYPATH', $sExpected);
$actual = json_encode($this->SerializeExtensionMap($oiTopExtensionsMap), JSON_PRETTY_PRINT);
$actual = preg_replace('/"module_file_path": .*/', '"module_file_path": ANYPATH', $actual);
$this->assertEquals($sExpected, $actual);
} }
public function SerializeExtensionMap(iTopExtensionsMap $oiTopExtensionsMap): array public function SerializeExtensionMap(iTopExtensionsMap $oiTopExtensionsMap): array

View File

@@ -54,7 +54,7 @@
"doc.manual_setup": "", "doc.manual_setup": "",
"doc.more_information": "", "doc.more_information": "",
"settings": [], "settings": [],
"module_file_path": "\/var\/www\/html\/iTopLegacy\/tests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-structure\/module.itop-structure.php" "module_file_path": "APPROOTtests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-structure\/module.itop-structure.php"
}, },
"itop-config-mgmt": { "itop-config-mgmt": {
"label": "Configuration Management (CMDB)", "label": "Configuration Management (CMDB)",
@@ -91,7 +91,7 @@
"doc.manual_setup": "", "doc.manual_setup": "",
"doc.more_information": "", "doc.more_information": "",
"settings": [], "settings": [],
"module_file_path": "\/var\/www\/html\/iTopLegacy\/tests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-config-mgmt\/module.itop-config-mgmt.php" "module_file_path": "APPROOT\/tests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-config-mgmt\/module.itop-config-mgmt.php"
} }
} }
}, },
@@ -182,7 +182,7 @@
"doc.manual_setup": "", "doc.manual_setup": "",
"doc.more_information": "", "doc.more_information": "",
"settings": [], "settings": [],
"module_file_path": "\/var\/www\/html\/iTopLegacy\/tests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-service-mgmt\/module.itop-service-mgmt.php" "module_file_path": "APPROOT\/tests\/php-unit-tests\/unitary-tests\/setup\/ressources\/datamodels\/2.x\/itop-service-mgmt\/module.itop-service-mgmt.php"
} }
} }
}, },