blob: d10c683ae309ae500affdfa8f863766440348f32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace HTML5\Parser;
require __DIR__ . '/../TestCase.php';
require 'EventStack.php';
class TokenizerTest extends \HTML5\Tests\TestCase {
protected function createTokenizer($string) {
$eventHandler = new EventStack();
$stream = new StringInputStream($string);
$scanner = new Scanner($stream);
return array(
new Tokenizer($scanner, $eventHandler),
$eventHandler,
);
}
public function testParse() {
list($tok, $events) = $this->createTokenizer('');
$tok->parse();
$this->assertEquals(0, $events->Depth());
}
}
|