Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 /**
  * @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'));
 }