File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,15 @@ private function getPhpParserNodeMock(): \PhpParser\Node
82
82
83
83
public function testParseTheSameFileWithDifferentMethod (): void
84
84
{
85
+ $ fileHelper = self ::getContainer ()->getByType (FileHelper::class);
85
86
$ pathRoutingParser = new PathRoutingParser (
86
- self :: getContainer ()-> getByType (FileHelper::class) ,
87
+ $ fileHelper ,
87
88
self ::getContainer ()->getService ('currentPhpVersionRichParser ' ),
88
89
self ::getContainer ()->getService ('currentPhpVersionSimpleDirectParser ' ),
89
90
self ::getContainer ()->getService ('php8Parser ' )
90
91
);
91
92
$ parser = new CachedParser ($ pathRoutingParser , 500 );
92
- $ path = __DIR__ . '/data/test.php ' ;
93
+ $ path = $ fileHelper -> normalizePath ( __DIR__ . '/data/test.php ' ) ;
93
94
$ pathRoutingParser ->setAnalysedFiles ([$ path ]);
94
95
$ contents = FileReader::read ($ path );
95
96
$ stmts = $ parser ->parseString ($ contents );
You can’t perform that action at this time.
0 commit comments