diff options
author | Asmir Mustafic <[email protected]> | 2014-05-12 08:44:29 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2014-05-12 08:44:29 +0200 |
commit | ee034afa09131fa0352e3133febc84e67e57be63 (patch) | |
tree | 8ea2f217cadb7a7caa32b7483894ca76c5c2d96b /test/HTML5/Parser/TokenizerTest.php | |
parent | fbc3c7e214a4bbbc9e88eb574414a91a0faa2176 (diff) |
PRS-4 tests
Diffstat (limited to 'test/HTML5/Parser/TokenizerTest.php')
-rw-r--r-- | test/HTML5/Parser/TokenizerTest.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index edc427c..f7f1228 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -1,9 +1,11 @@ <?php -namespace HTML5\Parser; -require_once __DIR__ . '/../TestCase.php'; -require 'EventStack.php'; +namespace HTML5\Tests\Parser; -class TokenizerTest extends \HTML5\Tests\TestCase { +use HTML5\Parser\UTF8Utils; +use HTML5\Parser\StringInputStream; +use HTML5\Parser\Scanner; +use HTML5\Parser\Tokenizer; +require 'EventStack.php';class TokenizerTest extends \HTML5\Tests\TestCase { // ================================================================ // Additional assertions. // ================================================================ @@ -109,7 +111,7 @@ class TokenizerTest extends \HTML5\Tests\TestCase { $e1 = $events->get(0); $this->assertEquals('error', $e1['name']); - // FIXME: Once the text processor is done, need to verify that the + // FIXME: Once the text processor is done, need to verify that the // tokens are transformed correctly into text. } @@ -139,12 +141,12 @@ class TokenizerTest extends \HTML5\Tests\TestCase { $succeed = array( '</a>' => 'a', '</test>' => 'test', - '</test + '</test >' => 'test', '</thisIsTheTagThatDoesntEndItJustGoesOnAndOnMyFriend>' => 'thisIsTheTagThatDoesntEndItJustGoesOnAndOnMyFriend', // See 8.2.4.10, which requires this and does not say error. - '</a<b>' => 'a<b', + '</a<b>' => 'a<b', ); $this->isAllGood('endTag', 2, $succeed); @@ -271,8 +273,8 @@ class TokenizerTest extends \HTML5\Tests\TestCase { public function testProcessorInstruction() { $good = array( '<?hph ?>' => 'hph', - '<?hph echo "Hello World"; ?>' => array('hph', 'echo "Hello World"; '), - "<?hph \necho 'Hello World';\n?>" => array('hph', "echo 'Hello World';\n"), + '<?hph echo "Hello World"; ?>' => array('hph', 'echo "Hello World"; '), + "<?hph \necho 'Hello World';\n?>" => array('hph', "echo 'Hello World';\n"), ); $this->isAllGood('pi', 2, $good); } |