public function testTooManyChoices() {
$constraint = new Choice(array(
'choices' => array(
'foo',
'bar',
'moo',
'maa',
),
'multiple' => true,
'max' => 2,
'maxMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ limit }}' => 2,
), null, 2);
$this->validator
->validate(array(
'foo',
'bar',
'moo',
), $constraint);
}