public function testTooLargeMegaBytes() {
fwrite($this->file, str_repeat('0', 1400000));
$constraint = new File(array(
'maxSize' => '1M',
'maxSizeMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ limit }}' => '1',
'{{ size }}' => '1.4',
'{{ suffix }}' => 'MB',
'{{ file }}' => $this->path,
));
$this->validator
->validate($this
->getFile($this->path), $constraint);
}