/** * @expectedException \RuntimeException */ public function testParseInvalidHttpRef() { $handler = Http\Handler\Mock::getByXmlDefinition(__DIR__ . '/http_mock.xml'); $http = new Http($handler); $resolver = JsonSchema\RefResolver::createDefault($http); $parser = new JsonSchema(__DIR__, $resolver); $parser->parse(file_get_contents(__DIR__ . '/invalid_http_ref_schema.json')); }
public function __construct($basePath = null, RefResolver $resolver = null) { $this->basePath = $basePath; $this->resolver = $resolver ?: RefResolver::createDefault(); }