@@ -12,12 +12,6 @@ function getFixturePath(string $filename): string
1212 return __DIR__ . '/fixtures/ ' . $ filename ;
1313}
1414
15- function getFixtureContent (string $ filename ): string
16- {
17- $ path = getFixturePath ($ filename );
18- return file_get_contents ($ path );
19- }
20-
2115class DifferTest extends TestCase
2216{
2317 public static function fileFormatsProvider (): array
@@ -31,19 +25,19 @@ public static function fileFormatsProvider(): array
3125 #[DataProvider('fileFormatsProvider ' )]
3226 public function testRecursiveComparisonJsonStylishFormat (string $ format ): void
3327 {
34- $ expected = file_get_contents ( getFixturePath ('expected_nested.txt ' ) );
28+ $ expected = getFixturePath ('expected_nested.txt ' );
3529
3630 $ actual = genDiff (getFixturePath ("file1. {$ format }" ), getFixturePath ("file2. {$ format }" ));
37- $ this ->assertNotEquals ($ expected , $ actual );
31+ $ this ->assertStringNotEqualsFile ($ expected , $ actual );
3832 }
3933
4034 #[DataProvider('fileFormatsProvider ' )]
4135 public function testPlainFormatOutput (string $ format ): void
4236 {
43- $ expected = file_get_contents ( getFixturePath ('expected_plain.txt ' ) );
37+ $ expected = getFixturePath ('expected_plain.txt ' );
4438
4539 $ actual = genDiff (getFixturePath ("file1. {$ format }" ), getFixturePath ("file2. {$ format }" ), 'plain ' );
46- $ this ->assertEquals ($ expected , $ actual );
40+ $ this ->assertStringEqualsFile ($ expected , $ actual );
4741 }
4842
4943 #[DataProvider('fileFormatsProvider ' )]
0 commit comments