public function testMultipleFieldsConvert()
{
$this->specify('Test uniqueness with combination of fields and a converted value.', function () {
$validation = new Validation();
$validation->add(['name', 'type'], new Uniqueness(['convert' => function (array $values) {
$values['type'] = 'hydraulic';
// mechanical -> hydraulic
return $values;
}]));
$messages = $validation->validate(null, $this->robot);
expect($messages->count())->equals(0);
});
}