public function FileValidatorTest::testMaxSizeNotExceeded in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\FileValidatorTest::testMaxSizeNotExceeded()
@dataProvider provideMaxSizeNotExceededTests
File
- vendor/
symfony/ validator/ Tests/ Constraints/ FileValidatorTest.php, line 214
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testMaxSizeNotExceeded($bytesWritten, $limit) {
fseek($this->file, $bytesWritten - 1, SEEK_SET);
fwrite($this->file, '0');
fclose($this->file);
$constraint = new File(array(
'maxSize' => $limit,
'maxSizeMessage' => 'myMessage',
));
$this->validator
->validate($this
->getFile($this->path), $constraint);
$this
->assertNoViolation();
}