Skip to content

Commit fd38f92

Browse files
committed
Added test with invalid content-type meta tag
1 parent 346e2ea commit fd38f92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/DomTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ public function testIncorrectAccess()
3333
$div = $dom->find('div', 0);
3434
$this->assertEquals(null, $div->foo);
3535
}
36+
public function testIncorrectContentType()
37+
{
38+
$dom = new Dom;
39+
$dom->load('<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8;"></head><body><div class="all"><p>Hey bro, <a href="google.com">click here</a><br /> :)</p></div></body></html>');
40+
$a = $dom->find('a', 0);
41+
$this->assertEquals($a->text, 'click here');
42+
}
3643

3744
public function testLoadSelfclosingAttr()
3845
{

0 commit comments

Comments
 (0)