Skip to content
Permalink
Browse files

Add more test on UploadedFileSize validation

  • Loading branch information...
vanquang9387 committed Oct 20, 2015
1 parent 13132cd commit 0cdfed0aee08bdf82d3b5baf6f4b163241f53b8b
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/Cake/Test/Case/Utility/ValidationTest.php
@@ -2547,6 +2547,19 @@ public function testUploadedFileSize() {
'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));
}
/**

0 comments on commit 0cdfed0

Please sign in to comment.
You can’t perform that action at this time.