Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | protected function init() |
||
23 | { |
||
24 | if (!array_key_exists('schemaDir', $this->config)) { |
||
25 | throw new \Exception('Config `schemaDir` is required '); |
||
26 | } |
||
27 | |||
28 | $this->validator = new \PTS\JsonSchema; |
||
29 | |||
30 | if (!array_key_exists('baseUri', $this->config)) { |
||
31 | $this->validator->setBaseUri($this->config['baseUri']); |
||
32 | } |
||
33 | |||
34 | $schemasDir = realpath(Configuration::testsDir() . '/' . $this->config['schemaDir']); |
||
35 | $this->validator->loadAllSchemas($schemasDir); |
||
36 | } |
||
37 | |||
44 |