diff options
Diffstat (limited to 'test/HTML5/JSONHarness.php')
-rw-r--r-- | test/HTML5/JSONHarness.php | 21 |
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 + } +} |