public function testExtraFieldsDisallowed() {
$data = $this
->prepareTestData(array(
'foo' => 5,
'baz' => 6,
));
$this->context
->expects($this
->once())
->method('addViolationAt')
->with('[baz]', 'myMessage', array(
'{{ field }}' => 'baz',
));
$this->validator
->validate($data, new Collection(array(
'fields' => array(
'foo' => new Range(array(
'min' => 4,
)),
),
'extraFieldsMessage' => 'myMessage',
)));
}