diff options
Diffstat (limited to 'test/HTML5/Parser/TokenizerTest.php')
-rw-r--r-- | test/HTML5/Parser/TokenizerTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index 9f335b0..231827c 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -387,6 +387,14 @@ class TokenizerTest extends \HTML5\Tests\TestCase { $this->assertEventError($events->get(1)); //$this->assertEventEquals('startTag', $expects, $events->get(1)); } + + // Regression: Malformed elements should be detected. + // '<foo baz="1" <bar></foo>' => array('foo', array('baz' => '1'), FALSE), + $events = $this->parse('<foo baz="1" <bar></foo>'); + $this->assertEventError($events->get(0)); + $this->assertEventEquals('startTag', array('foo', array('baz' => '1'), FALSE), $events->get(1)); + $this->assertEventEquals('startTag', array('bar', array(), FALSE), $events->get(2)); + $this->assertEventEquals('endTag', array('foo'), $events->get(3)); } public function testRawText() { |