public resolve ( JsonSchema\RefResolver $resolver ) | ||
$resolver | JsonSchema\RefResolver |
public function resolve(RefResolver $resolver)
{
if (!$this->hasUri()) {
return $this;
}
$resolver->resolve($this->getContent(), $this->uri);
return $this;
}
public function test_should_resolve_with_uri() { $this->given($schema = new TestedClass('{}', 'file://test'), $this->mockGenerator->orphanize('__construct'), $resolver = new \mock\JsonSchema\RefResolver(), $resolver->getMockController()->resolve = true)->when($result = $schema->resolve($resolver))->mock($resolver)->call('resolve')->withArguments('{}', 'file://test')->once()->object($result)->isIdenticalTo($schema); }