mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Add more test on UploadedFileSize validation
This commit is contained in:
parent
13132cd113
commit
0cdfed0aee
1 changed files with 13 additions and 0 deletions
|
@ -2547,6 +2547,19 @@ class ValidationTest extends CakeTestCase {
|
|||
'maxSize' => 100
|
||||
);
|
||||
$this->assertFalse(Validation::uploadedFile($file, $options), 'Too big');
|
||||
$options = array(
|
||||
'minSize' => 100,
|
||||
);
|
||||
$this->assertTrue(Validation::uploadedFile($file, $options));
|
||||
$options = array(
|
||||
'maxSize' => 500,
|
||||
);
|
||||
$this->assertTrue(Validation::uploadedFile($file, $options));
|
||||
$options = array(
|
||||
'minSize' => 100,
|
||||
'maxSize' => 500
|
||||
);
|
||||
$this->assertTrue(Validation::uploadedFile($file, $options));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue