Skip to content

Commit 5b91f82

Browse files
committed
Add more tests
1 parent f25347a commit 5b91f82

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/Diff/LargeInputTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Tests\Diff;
4+
5+
use PHPUnit\Framework\TestCase;
6+
use jblond\Diff;
7+
use jblond\Diff\Renderer\Text\Unified;
8+
9+
class LargeInputTest extends TestCase
10+
{
11+
public function testLargeInputDoesNotCrash(): void
12+
{
13+
$a = str_repeat("A\n", 2000);
14+
$b = str_repeat("B\n", 2000);
15+
$diff = new Diff($a, $b);
16+
$output = $diff->render(new Unified());
17+
$this->assertNotEmpty($output);
18+
}
19+
}

0 commit comments

Comments
 (0)