private function expectFails($schemaConfig, $error)
{
try {
$schema = new Schema($schemaConfig);
$errors = SchemaValidator::validate($schema);
if ($errors) {
throw $errors[0];
}
$this->fail('Expected exception not thrown');
} catch (\Exception $e) {
$this->assertEquals($e->getMessage(), $error);
}
}