Skip to content

Commit

Permalink
Cleanup AnalyserIntegrationTest->runAnalyse()
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Mar 8, 2024
1 parent 6b52280 commit c3c6055
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1307,13 +1307,11 @@ public function testBug10538(): void
private function runAnalyse(string $file, ?array $allAnalysedFiles = null): array
{
$file = $this->getFileHelper()->normalizePath($file);
/** @var Analyser $analyser */

$analyser = self::getContainer()->getByType(Analyser::class);
/** @var FileHelper $fileHelper */
$fileHelper = self::getContainer()->getByType(FileHelper::class);
$errors = $analyser->analyse([$file], null, null, true, $allAnalysedFiles)->getErrors();
foreach ($errors as $error) {
$this->assertSame($fileHelper->normalizePath($file), $error->getFilePath());
$this->assertSame($file, $error->getFilePath());
}

return $errors;
Expand Down

0 comments on commit c3c6055

Please sign in to comment.