public function TokenizerTest::testBogusComment in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php \Masterminds\HTML5\Tests\Parser\TokenizerTest::testBogusComment()
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php, line 123
Class
Namespace
Masterminds\HTML5\Tests\ParserCode
public function testBogusComment() {
$bogus = array(
'</+this is a bogus comment. +>',
'<!+this is a bogus comment. !>',
'<!D OCTYPE foo bar>',
'<!DOCTYEP foo bar>',
'<![CADATA[ TEST ]]>',
'<![CDATA Hello ]]>',
'<![CDATA[ Hello [[>',
'<!CDATA[[ test ]]>',
'<![CDATA[',
'<![CDATA[hellooooo hello',
'<? Hello World ?>',
'<? Hello World',
);
foreach ($bogus as $str) {
$events = $this
->parse($str);
$this
->assertEventError($events
->get(0));
$this
->assertEventEquals('comment', $str, $events
->get(1));
}
}