public function test_should_valid_json_through_its_schema() { $this->given($json = new \mock\Sanpi\Behatch\Json\Json('{}'), $schema = new \mock\Sanpi\Behatch\Json\JsonSchema('{}'), $schema->getMockController()->resolve = $schema, $schema->getMockController()->validate = 'foobar', $inspector = new TestedClass('foo'))->when($result = $inspector->validate($json, $schema))->variable($result)->isEqualTo('foobar')->mock($schema)->call('resolve')->withArguments(new RefResolver(new UriRetriever()))->once()->call('validate')->withArguments($json, new Validator())->once(); }