summaryrefslogtreecommitdiff
path: root/test/HTML5
diff options
context:
space:
mode:
authorTechnosophos <[email protected]>2013-04-10 17:41:19 -0500
committerTechnosophos <[email protected]>2013-04-10 17:41:19 -0500
commit7499b8919876b4ead8a1241fe3e188a62f575ff3 (patch)
tree082c61ee5ddaaaec7df20d103c933ac930937f9a /test/HTML5
parent759ed42c4436ea256add2bd675a1d18028ace0c7 (diff)
Instead of throwing parse errors, we now send as events.
Diffstat (limited to 'test/HTML5')
-rw-r--r--test/HTML5/Parser/EventStack.php6
-rw-r--r--test/HTML5/Parser/TokenizerTest.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/test/HTML5/Parser/EventStack.php b/test/HTML5/Parser/EventStack.php
index 9754334..68f0aa9 100644
--- a/test/HTML5/Parser/EventStack.php
+++ b/test/HTML5/Parser/EventStack.php
@@ -61,5 +61,11 @@ class EventStack implements EventHandler {
$this->store('eof');
}
+ public function parseError($msg, $line, $col) {
+ throw new EventStackParseError(sprintf("%s (line %d, col %d)", $msg, $line, $col));
+ }
+
}
+class EventStackParseError extends \Exception {
+}
diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php
index 9b1727f..b6ce01f 100644
--- a/test/HTML5/Parser/TokenizerTest.php
+++ b/test/HTML5/Parser/TokenizerTest.php
@@ -76,7 +76,7 @@ class TokenizerTest extends \HTML5\Tests\TestCase {
}
/**
- * @expectedException \HTML5\Parser\ParseError
+ * @expectedException \HTML5\Parser\EventStackParseError
*/
public function testBrokenCharacterReference() {
// Test with broken charref