Merge remote-tracking branch 'origin/support/3.0' into develop

This commit is contained in:
Molkobain
2022-07-29 15:28:11 +02:00
2 changed files with 7 additions and 4 deletions

View File

@@ -42,9 +42,12 @@ class iTopConfigSyntaxValidatorTest extends ItopTestCase
$this->expectException(\Exception::class);
try{
$oiTopConfigValidator->Validate("<?php \n zef;zefzef \n zdadz = azdazd \n zerfgzaezerfgzef>");
}catch (\Exception $e)
{
$this->assertStringStartsWith('Error in configuration: syntax error, unexpected \'zdadz\' (T_STRING)', $e->getMessage());
} catch (\Exception $e) {
if (version_compare(phpversion(), '8.0.0', '<')) {
$this->assertStringStartsWith('Error in configuration: syntax error, unexpected \'zdadz\' (T_STRING)', $e->getMessage());
} else {
$this->assertStringStartsWith('Error in configuration: syntax error, unexpected identifier "zdadz" at line 2', $e->getMessage());
}
throw $e;
}
}