public function testRequiredFieldNotPresent() {
$data = $this
->prepareTestData(array());
$this->context
->expects($this
->once())
->method('addViolationAt')
->with('[foo]', 'myMessage', array(
'{{ field }}' => 'foo',
));
$this->validator
->validate($data, new Collection(array(
'fields' => array(
'foo' => new Required(),
),
'missingFieldsMessage' => 'myMessage',
)));
}