Skip to content

Commit 0860a5e

Browse files
authored
Add failing test for issue #140
1 parent d95c2f7 commit 0860a5e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/Unit/Drivers/HtmlDriverTest.php

+21
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@ 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+
28+
/** @test */
29+
public function test_for_issue_140()
30+
{
31+
$driver = new HtmlDriver();
32+
33+
$expected = implode("\n", [
34+
'<!DOCTYPE html>',
35+
'<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">',
36+
'<head>',
37+
'<!--[if !mso]><!-->',
38+
'<meta http-equiv="X-UA-Compatible" content="IE=edge">',
39+
'<!--<![endif]-->',
40+
'</head>',
41+
'<body><h1>Hello, world!</h1></body>',
42+
'</html>',
43+
'',
44+
]);
45+
46+
$this->assertEquals($expected, $driver->serialize($expected));
47+
}
2748

2849
/** @test */
2950
public function it_can_only_serialize_strings()

0 commit comments

Comments
 (0)