File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments