diff options
author | Asmir Mustafic <[email protected]> | 2014-08-01 08:51:49 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2014-08-01 08:51:49 +0200 |
commit | 50d439ef7ce03859c8ef177ebb1d2531939a00e8 (patch) | |
tree | 682033778dd46391a2871b65afa44a5a4d4d2519 /test/HTML5/Parser/TokenizerTest.php | |
parent | 2cad9c173f14eb390f78100dd74ef005f67e1fa5 (diff) |
Closes #56
Diffstat (limited to 'test/HTML5/Parser/TokenizerTest.php')
-rw-r--r-- | test/HTML5/Parser/TokenizerTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index 9f0f4b4..bf04c58 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -909,6 +909,18 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEventEquals('text', 'Test', $events->get(1)); $this->assertEventEquals('endTag', 'a', $events->get(2)); + $events = $this->parse('<p>0</p><p>1</p>'); + $this->assertEquals(7, $events->depth(), "Events: " . print_r($events, true)); + + $this->assertEventEquals('startTag', 'p', $events->get(0)); + $this->assertEventEquals('text', '0', $events->get(1)); + $this->assertEventEquals('endTag', 'p', $events->get(2)); + + $this->assertEventEquals('startTag', 'p', $events->get(3)); + $this->assertEventEquals('text', '1', $events->get(4)); + $this->assertEventEquals('endTag', 'p', $events->get(5)); + + $events = $this->parse('a<![CDATA[test]]>b'); $this->assertEquals(4, $events->depth(), "Events: " . print_r($events, true)); $this->assertEventEquals('text', 'a', $events->get(0)); |