diff --git a/tests/BetterPhpDocParser/PhpDocParser/TagValueNodeReprint/TestModifyReprintTest.php b/tests/BetterPhpDocParser/PhpDocParser/TagValueNodeReprint/TestModifyReprintTest.php index 5ee46d5ad79..9cc2d0f8134 100644 --- a/tests/BetterPhpDocParser/PhpDocParser/TagValueNodeReprint/TestModifyReprintTest.php +++ b/tests/BetterPhpDocParser/PhpDocParser/TagValueNodeReprint/TestModifyReprintTest.php @@ -94,7 +94,7 @@ final class SomeEntity $this->assertSame( "/**\n * @ORM\DiscriminatorMap({1=\"First\", 5=\"Second\", 7=\"Third\"})\n */", - $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo) + str_replace("\r\n", "\n", $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo)) ); } diff --git a/tests/PhpParser/Printer/BetterStandardPrinterTest.php b/tests/PhpParser/Printer/BetterStandardPrinterTest.php index 6ba17954cba..3bc626e21a4 100644 --- a/tests/PhpParser/Printer/BetterStandardPrinterTest.php +++ b/tests/PhpParser/Printer/BetterStandardPrinterTest.php @@ -152,7 +152,9 @@ private function printWithRemovedImplements(string $fileContent): string } } - return $this->betterStandardPrinter->printFormatPreserving($newStmts, $oldStmts, $tokens); + $printed = $this->betterStandardPrinter->printFormatPreserving($newStmts, $oldStmts, $tokens); + + return str_replace("\r\n", "\n", $printed); } /**