Skip to content

Commit c6b1949

Browse files
committed
Add test to cover previously uncovered behaviour
1 parent 90b853f commit c6b1949

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/Unit/Drivers/HtmlDriverTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function it_can_serialize_a_html_string_to_pretty_html()
2424

2525
$this->assertEquals($expected, $driver->serialize('<!doctype html><html lang="en"><head></head><body><h1>Hello, world!</h1></body></html>'));
2626
}
27-
27+
2828
/** @test */
2929
public function test_for_issue_140()
3030
{
@@ -46,6 +46,22 @@ public function test_for_issue_140()
4646
$this->assertEquals($expected, $driver->serialize($expected));
4747
}
4848

49+
/** @test */
50+
public function it_can_serialize_a_html_string_without_a_doctype()
51+
{
52+
$driver = new HtmlDriver();
53+
54+
$expected = implode("\n", [
55+
'<html lang="en">',
56+
'<head></head>',
57+
'<body><h1>Hello, world!</h1></body>',
58+
'</html>',
59+
'',
60+
]);
61+
62+
$this->assertEquals($expected, $driver->serialize('<html lang="en"><head></head><body><h1>Hello, world!</h1></body></html>'));
63+
}
64+
4965
/** @test */
5066
public function it_can_only_serialize_strings()
5167
{

0 commit comments

Comments
 (0)