Merge branch 'support/2.7' into support/3.0

# Conflicts:
#	tests/php-unit-tests/src/BaseTestCase/ItopTestCase.php
#	tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php
This commit is contained in:
Romain Quetiez
2024-05-16 10:09:11 +02:00
9 changed files with 159 additions and 220 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);
}
}
}