Skip to content

Commit d69ca08

Browse files
committed
clean up fixture
1 parent 8f69825 commit d69ca08

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

tests/ChangesReporting/Output/Factory/JsonOutputFactoryTest.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,26 @@ final class JsonOutputFactoryTest extends TestCase
1717
{
1818
public function testReportShouldShowNumberOfChangesWithNoDiffs(): void
1919
{
20+
$expectedOutput = <<<'JSON'
21+
{
22+
"totals": {
23+
"changed_files": 2,
24+
"errors": 1
25+
},
26+
"changed_files": [
27+
"some/file.php",
28+
"some/file_foo.php"
29+
],
30+
"errors": [
31+
{
32+
"message": "Some error message",
33+
"file": "some/file.php",
34+
"line": 1
35+
}
36+
]
37+
}
38+
JSON;
39+
2040
$actualOutput = JsonOutputFactory::create(
2141
new ProcessResult(
2242
[new SystemError('Some error message', 'some/file.php', 1)],
@@ -41,7 +61,6 @@ public function testReportShouldShowNumberOfChangesWithNoDiffs(): void
4161
new Configuration(showDiffs: false)
4262
);
4363

44-
$expectedOutput = (string) file_get_contents(__DIR__ . '/../Fixtures/without_diffs.json');
4564
$this->assertSame($expectedOutput, $actualOutput);
4665
}
4766
}

tests/ChangesReporting/Output/Fixtures/without_diffs.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)