Skip to content

Commit

Permalink
Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 5, 2021
1 parent 1a34d80 commit b9a0f01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/PHPStan/Parser/CachedParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ private function getPhpParserNodeMock(): \PhpParser\Node

public function testParseTheSameFileWithDifferentMethod(): void
{
$fileHelper = self::getContainer()->getByType(FileHelper::class);
$pathRoutingParser = new PathRoutingParser(
self::getContainer()->getByType(FileHelper::class),
$fileHelper,
self::getContainer()->getService('currentPhpVersionRichParser'),
self::getContainer()->getService('currentPhpVersionSimpleDirectParser'),
self::getContainer()->getService('php8Parser')
);
$parser = new CachedParser($pathRoutingParser, 500);
$path = __DIR__ . '/data/test.php';
$path = $fileHelper->normalizePath(__DIR__ . '/data/test.php');
$pathRoutingParser->setAnalysedFiles([$path]);
$contents = FileReader::read($path);
$stmts = $parser->parseString($contents);
Expand Down

0 comments on commit b9a0f01

Please sign in to comment.