Merge branch 'support/3.0' into support/3.1

# Conflicts:
#	tests/php-unit-tests/src/BaseTestCase/ItopTestCase.php
This commit is contained in:
Romain Quetiez
2024-05-16 14:07:36 +02:00
9 changed files with 183 additions and 241 deletions

View File

@@ -289,8 +289,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);
}
/**

View File

@@ -69,6 +69,12 @@ class UnattendedInstallTest extends ItopDataTestCase
$sOutput = implode('\n', $aOutput);
var_dump($sOutput);
$this->assertStringContainsString("Missing mandatory argument `--param-file`", $sOutput);
$this->assertEquals(255, $iCode);
if (DIRECTORY_SEPARATOR === '\\') {
// Windows
$this->assertEquals(-1, $iCode);
} else {
// Linux
$this->assertEquals(255, $iCode);
}
}
}