Support other OS on tests (#1715)

This commit is contained in:
erikn69
2025-07-17 07:52:32 +02:00
committed by GitHub
parent cff244b9b5
commit 6d96f0bd1a
7 changed files with 33 additions and 60 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ class SnapshotTxtDriver implements Driver
{
public function serialize($data): string
{
return (string) $data;
return str_replace(["\r\n", "\r"], "\n", (string) $data);
}
public function extension(): string
@@ -21,6 +21,6 @@ class SnapshotTxtDriver implements Driver
public function match($expected, $actual)
{
Assert::assertSame($expected, $this->serialize($actual));
Assert::assertSame(str_replace(["\r\n", "\r"], "\n", $expected), $this->serialize($actual));
}
}