Skip to content

Commit 609c934

Browse files
committed
Add more tests
1 parent e27241d commit 609c934

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tests\Diff\Renderer\Html;
6+
7+
use jblond\Diff;
8+
use jblond\Diff\Renderer\Html\Merged;
9+
use PHPUnit\Framework\TestCase;
10+
11+
class MergedTest extends TestCase
12+
{
13+
public function testMergedRendererReplaceCase()
14+
{
15+
$a = "line1\nsame\nline3";
16+
$b = "line1\nchanged\nline3";
17+
18+
$diff = new Diff($a, $b);
19+
$output = $diff->render(new Merged());
20+
21+
$this->assertStringContainsString('<del', $output);
22+
$this->assertStringContainsString('<ins', $output);
23+
}
24+
}

0 commit comments

Comments
 (0)