public function testTooLargeBytes() {
fwrite($this->file, str_repeat('0', 11));
$constraint = new File(array(
'maxSize' => 10,
'maxSizeMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ limit }}' => '10',
'{{ size }}' => '11',
'{{ suffix }}' => 'bytes',
'{{ file }}' => $this->path,
));
$this->validator
->validate($this
->getFile($this->path), $constraint);
}