Adjust php setup requirement to version 7.2.5.

Improve test error message.
This commit is contained in:
Benjamin Dalsass
2022-06-14 17:38:46 +02:00
parent 79da71ecf8
commit 977a8add67
2 changed files with 9 additions and 6 deletions

View File

@@ -135,9 +135,12 @@ class SetupUtilsTest extends ItopTestCase
if (file_exists(APPROOT.'composer.json')) {
$oComposerConfig = json_decode(file_get_contents(APPROOT.'composer.json'));
// Platform/PHP must be set to the minimum to ensure dependancies are compatible with the min. version
$this->assertEquals($sPHPMinVersion, $oComposerConfig->config->platform->php, "Composer/Platform/PHP");
$sComposerPlatformPhp = $oComposerConfig->config->platform->php;
$this->assertEquals($sPHPMinVersion, $oComposerConfig->config->platform->php, "SetupUtils::PHP_MIN_VERSION ($sPHPMinVersion) is not equals composer.json > config > platform ($sComposerPlatformPhp)");
// Require/PHP must be set to the supported PHP versions range in order to keep our package constraints up-to-date
$this->assertEquals(">=$sPHPMinVersion <$sPHPNotValidatedVersion", $oComposerConfig->require->php, "Composer/Require/PHP");
$sComposerRequirePhp = $oComposerConfig->require->php;
$this->assertEquals(">=$sPHPMinVersion <$sPHPNotValidatedVersion", $oComposerConfig->require->php,
"SetupUtils::PHP_MIN_VERSION ($sPHPMinVersion) and SetupUtils::PHP_NOT_VALIDATED_VERSION ($sPHPNotValidatedVersion) is not equals composer.json > require > php ($sComposerRequirePhp)");
}
}
}