Skip to content

Commit 908372a

Browse files
committed
Revert "test change"
This reverts commit e9b5a0f.
1 parent e9b5a0f commit 908372a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/ChangesReporting/Output/JsonOutputFormatterTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testGetName(): void
3131

3232
public function testReportShouldShowNumberOfChangesWithNoDiffs(): void
3333
{
34-
$this->expectOutputString((string) file_get_contents(__DIR__ . '/Fixtures/without_diffs.json'));
34+
$this->expectOsOutputString((string) file_get_contents(__DIR__ . '/Fixtures/without_diffs.json'));
3535

3636
$this->jsonOutputFormatter->report(
3737
new ProcessResult(
@@ -57,4 +57,14 @@ public function testReportShouldShowNumberOfChangesWithNoDiffs(): void
5757
new Configuration(showDiffs: false)
5858
);
5959
}
60+
61+
protected function expectOsOutputString(string $expectedOutput): void
62+
{
63+
$isWindows = strncasecmp(PHP_OS, 'WIN', 3) === 0;
64+
if ($isWindows) {
65+
$expectedOutput = str_replace('%0A', '%0D%0A', $expectedOutput);
66+
}
67+
68+
parent::expectOutputString($expectedOutput);
69+
}
6070
}

0 commit comments

Comments
 (0)