summaryrefslogtreecommitdiff
path: root/test/HTML5/JSONHarness.php
diff options
context:
space:
mode:
authorTechnosophos <[email protected]>2013-04-02 16:44:02 -0500
committerTechnosophos <[email protected]>2013-04-02 16:44:02 -0500
commit8a5d21165697440ae80756d9b8acf56dd682d0fc (patch)
tree27305660f874c168308418fe3a7d6bf0c3aa3de6 /test/HTML5/JSONHarness.php
parent91d1684acf50e0f6b58c877765ab9863e650a33a (diff)
Initial add of html5lib.
Diffstat (limited to 'test/HTML5/JSONHarness.php')
-rw-r--r--test/HTML5/JSONHarness.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/HTML5/JSONHarness.php b/test/HTML5/JSONHarness.php
new file mode 100644
index 0000000..dd1cf66
--- /dev/null
+++ b/test/HTML5/JSONHarness.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Implementation specifically for JSON format files.
+ */
+SimpleTest::ignore('HTML5_JSONHarness');
+abstract class HTML5_JSONHarness extends HTML5_DataHarness
+{
+ protected $data;
+ public function __construct() {
+ parent::__construct();
+ $this->data = json_decode(file_get_contents($this->filename));
+ }
+ public function getDescription($test) {
+ return $test->description;
+ }
+ public function getDataTests() {
+ return isset($this->data->tests) ? $this->data->tests : array();
+ // could be a weird xmlViolationsTest
+ }
+}