Make the tests compatible with windows (and linux)

This commit is contained in:
Romain Quetiez
2024-05-03 15:24:59 +02:00
parent 5d5df5ad1a
commit ccaf2dc5b7
3 changed files with 12 additions and 6 deletions

View File

@@ -287,8 +287,8 @@ class InstallationFileServiceTest extends ItopTestCase {
private function GetMockListOfFoundModules() : array {
$sJsonContent = file_get_contents(realpath(__DIR__ . '/resources/AnalyzeInstallation.json'));
$sJsonContent = str_replace('ROOTDIR_TOREPLACE', APPROOT, $sJsonContent);
return json_decode($sJsonContent, true);
$sJsonContent = str_replace('ROOTDIR_TOREPLACE', addslashes(APPROOT), $sJsonContent);
return json_decode($sJsonContent, true);
}
/**