blob: dd1cf66073227a271f644ae3981e15f3219670e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
}
}
|