summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnosophos <[email protected]>2013-04-17 14:34:56 -0500
committerTechnosophos <[email protected]>2013-04-17 14:34:56 -0500
commit7ca281ea599de0ae016aada9da9a65da38db9760 (patch)
tree7d513eb06c758f02dcd102a17ce67692509ff9ed
parent94f597ed847b84fc54d4fc0c2407f97fd679bec5 (diff)
Added uppercase tests.
-rw-r--r--src/HTML5/Parser/Tokenizer.php10
-rw-r--r--test/HTML5/Parser/TokenizerTest.php3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index 834039b..7ea714e 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -371,6 +371,16 @@ class Tokenizer {
return array();
}
+ protected function attribute() {
+ $name = $this->scanner->charsUntil("/>= '\"\n\f\t");
+ $val = $this->attributeValue();
+ return array($name, $value);
+ }
+
+ protected function attributeValue() {
+ return '';
+ }
+
/**
* Consume malformed markup as if it were a comment.
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php
index 9496ba4..d988df1 100644
--- a/test/HTML5/Parser/TokenizerTest.php
+++ b/test/HTML5/Parser/TokenizerTest.php
@@ -279,6 +279,8 @@ class TokenizerTest extends \HTML5\Tests\TestCase {
public function testSimpleTags() {
$open = array(
'<foo>' => 'foo',
+ '<FOO>' => 'foo',
+ '<fOO>' => 'foo',
'<foo >' => 'foo',
"<foo\n\n\n\n>" => 'foo',
'<foo:bar>' => 'foo:bar',
@@ -290,6 +292,7 @@ class TokenizerTest extends \HTML5\Tests\TestCase {
}
$selfClose= array(
'<foo/>' => 'foo',
+ '<FOO/>' => 'foo',
'<foo />' => 'foo',
"<foo\n\n\n\n/>" => 'foo',
'<foo:bar/>' => 'foo:bar',