88use PHPStan \Parser \Parser ;
99use PHPStan \Parser \RichParser ;
1010use Rector \Testing \PHPUnit \AbstractLazyTestCase ;
11+ <<<<<<< HEAD
1112use ReflectionProperty;
13+ =======
14+ >>>>>>> ea9a6ad8a5 ([issue 9492 ] create reproducer for modified array_map args, as creates changed args on print )
1215
1316/**
1417 * Test case for: https://github.com/rectorphp/rector/issues/9492
@@ -24,17 +27,30 @@ public function testAddingCommentOnSomeNodesFail(): void
2427 $ stmts = $ phpstanParser ->parseFile (__DIR__ . '/Fixture/some_array_map.php ' );
2528
2629 // get private property "parser"
30+ <<<<<<< HEAD
2731 $ parserReflectionProperty = new ReflectionProperty (RichParser::class, 'parser ' );
32+ =======
33+ $ parserReflectionProperty = new \ReflectionProperty (RichParser::class, 'parser ' );
34+ >>>>>>> ea9a6ad8a5 ([issue 9492 ] create reproducer for modified array_map args, as creates changed args on print )
2835
2936 /** @var \PhpParser\Parser $innerParser */
3037 $ innerParser = $ parserReflectionProperty ->getValue ($ phpstanParser );
3138 $ tokens = $ innerParser ->getTokens ();
3239
40+ <<<<<<< HEAD
3341 $ standard = new Standard ([]);
3442 $ printerContents = $ standard ->printFormatPreserving ($ stmts , $ stmts , $ tokens );
3543
3644 $ newlineNormalizedContents = str_replace ("\r\n" , PHP_EOL , $ printerContents );
3745
3846 $ this ->assertStringEqualsFile (__DIR__ . '/Fixture/some_array_map.php ' , $ newlineNormalizedContents );
47+ =======
48+ $ standardPrinter = new Standard ([
49+ 'newline ' => "\n" ,
50+ ]);
51+ $ printerContents = $ standardPrinter ->printFormatPreserving ($ stmts , $ stmts , $ tokens );
52+
53+ $ this ->assertStringEqualsFile (__DIR__ . '/Fixture/some_array_map.php ' , $ printerContents );
54+ >>>>>>> ea9a6ad8a5 ([issue 9492 ] create reproducer for modified array_map args, as creates changed args on print )
3955 }
4056}
0 commit comments