Skip to content

Commit e4199a4

Browse files
authored
Fix build
1 parent 284078f commit e4199a4

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

tests/PHPStan/Analyser/Bug13813IntegrationTest.php

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,25 @@ public function testBug13813(): void
2424
$this->assertCount(2, $analyzerResult->getAllPhpErrors());
2525
$this->assertCount(2, $analyzerResult->getFilteredPhpErrors());
2626

27-
$this->assertSame(
28-
'Warning: Undefined variable $x',
29-
$analyzerResult->getAllPhpErrors()[0]->getMessage()
30-
);
31-
$this->assertSame(
32-
'Warning: Undefined variable $x',
33-
$analyzerResult->getAllPhpErrors()[1]->getMessage()
34-
);
27+
if (PHP_VERSION_ID >= 80000) {
28+
$this->assertSame(
29+
'Warning: Undefined variable $x',
30+
$analyzerResult->getAllPhpErrors()[0]->getMessage(),
31+
);
32+
$this->assertSame(
33+
'Warning: Undefined variable $x',
34+
$analyzerResult->getAllPhpErrors()[1]->getMessage(),
35+
);
36+
} else {
37+
$this->assertSame(
38+
'Notice: Undefined variable $x',
39+
$analyzerResult->getAllPhpErrors()[0]->getMessage(),
40+
);
41+
$this->assertSame(
42+
'Notice: Undefined variable $x',
43+
$analyzerResult->getAllPhpErrors()[1]->getMessage(),
44+
);
45+
}
3546
}
3647

3748
/**

0 commit comments

Comments
 (0)