mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-06 08:14:21 +01:00
Unit test 'CFileValidatorTest' has been updated to expose issue #2821
This commit is contained in:
@@ -35,4 +35,14 @@ class CFileValidatorTest extends CTestCase
|
||||
$fileValidator=new CFileValidator();
|
||||
$this->assertEquals($assertion, $fileValidator->sizeToBytes($sizeString));
|
||||
}
|
||||
|
||||
public function testValidate()
|
||||
{
|
||||
$model = new ValidatorTestModel(__CLASS__);
|
||||
|
||||
$uploadedFile = new CUploadedFile('test.txt', __FILE__, 'text/plain', 40, UPLOAD_ERR_OK);
|
||||
$model->uploaded_file = $uploadedFile;
|
||||
|
||||
$this->assertTrue($model->validate(), 'Valid file validation failed!');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user