protected function setUp() { //$mockCapture = new MockCapture('tests/PSX/Webfinger/webfinger_http_fixture.xml'); $mock = Mock::getByXmlDefinition('tests/PSX/Webfinger/webfinger_http_fixture.xml'); $this->http = new Http($mock); $this->webfinger = new Webfinger($this->http); }
protected function setUp() { //$mockCapture = new MockCapture('tests/PSX/Hostmeta/hostmeta_http_fixture.xml'); $mock = Mock::getByXmlDefinition('tests/PSX/Hostmeta/hostmeta_http_fixture.xml'); $this->http = new Http($mock); $this->hostmeta = new Hostmeta($this->http); }
/** * @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')); }