Skip to content
Merged

fix cs #4562

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions tests/PHPStan/Analyser/Bug13813IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,25 @@ public function testBug13813(): void
$this->assertCount(2, $analyzerResult->getAllPhpErrors());
$this->assertCount(2, $analyzerResult->getFilteredPhpErrors());

$this->assertSame(
'Warning: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[0]->getMessage()
);
$this->assertSame(
'Warning: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[1]->getMessage()
);
if (PHP_VERSION_ID >= 80000) {
$this->assertSame(
'Warning: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[0]->getMessage(),
);
$this->assertSame(
'Warning: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[1]->getMessage(),
);
} else {
$this->assertSame(
'Notice: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[0]->getMessage(),
);
$this->assertSame(
'Notice: Undefined variable $x',
$analyzerResult->getAllPhpErrors()[1]->getMessage(),
);
}
}

/**
Expand Down
Loading