Sanpi\Behatch\Json\JsonSchema::resolve PHP 메소드

resolve() 공개 메소드

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;
    }

Usage Example

예제 #1
0
 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);
 }
All Usage Examples Of Sanpi\Behatch\Json\JsonSchema::resolve