1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Further improve tests

This commit is contained in:
Aidan Woods 2019-02-11 21:17:45 +00:00
parent 4fb6ac31a5
commit 93e68056a8
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -17,19 +17,23 @@ final class LinesTest extends TestCase
public function testContainsBlankLines() public function testContainsBlankLines()
{ {
$Lines = Lines::fromTextLines('foo', 0); $Lines = Lines::fromTextLines('foo', 0);
$this->assertFalse($Lines->containsBlankLines()); $this->assertFalse($Lines->containsBlankLines());
$Lines = $Lines->appendingTextLines('bar', 0); $Lines = $Lines->appendingTextLines('bar', 0);
$this->assertFalse($Lines->containsBlankLines()); $this->assertFalse($Lines->containsBlankLines());
$Lines = $Lines->appendingTextLines("boo\nbaz", 0); $Lines = $Lines->appendingTextLines("boo\nbaz", 0);
$this->assertFalse($Lines->containsBlankLines()); $this->assertFalse($Lines->containsBlankLines());
$Lines = $Lines->appendingTextLines("zoo\n\nzoom", 0); $Lines = $Lines->appendingTextLines("zoo\n\nzoom", 0);
$this->assertTrue($Lines->containsBlankLines());
$Lines = Lines::fromTextLines('foo', 0);
$Lines = $Lines->appendingTextLines('', 0);
$this->assertTrue($Lines->containsBlankLines());
$Lines = Lines::fromTextLines('foo', 0);
$Lines = $Lines->appendingTextLines("\n", 0);
$this->assertTrue($Lines->containsBlankLines()); $this->assertTrue($Lines->containsBlankLines());
} }