public function test_validate_invalid()
{
$schema = $this->newTestedInstance('{ "type": "object", "properties": {}, "additionalProperties": false }');
$json = new \Sanpi\Behatch\Json\Json('{ "foo": { "bar": "foobar" } }');
$validator = new \JsonSchema\Validator();
$this->exception(function () use($schema, $json, $validator) {
$schema->validate($json, $validator);
})->hasMessage(<<<EOD
JSON does not validate. Violations:
- [] The property foo is not defined and the definition does not allow additional properties
EOD
);
}