Skip to content

Commit bbf90b5

Browse files
committed
Add: Test for no changes
1 parent 2ce76ac commit bbf90b5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Diff/Renderer/Text/TextRenderersTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,23 @@ public function testContext(): void
6363
$this->assertStringEqualsFile('tests/resources/textContext.txt', $result);
6464
}
6565

66+
/**
67+
* Test the output of the text-context renderer without any change.
68+
*
69+
* @covers \jblond\Diff\Renderer\MainRenderer
70+
*/
71+
public function testContextNoChanges(): void
72+
{
73+
$diff = new Diff(
74+
file_get_contents('tests/resources/a.txt'),
75+
file_get_contents('tests/resources/a.txt')
76+
);
77+
78+
$renderer = new Diff\Renderer\Text\InlineCli();
79+
$result = $diff->render($renderer);
80+
$this->assertEmpty($result);
81+
}
82+
6683
/**
6784
* Test the output of the text-unified renderer.
6885
*

0 commit comments

Comments
 (0)