mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°3129 - PHP 8.0: Fix unit test for which the tested error message as changed
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user