Unit test 'CFileValidatorTest' has been updated to expose issue #2821

This commit is contained in:
Paul Klimov
2013-08-29 11:28:46 +03:00
parent 84a37ef5d1
commit db6e6bc58c
2 changed files with 14 additions and 0 deletions

View File

@@ -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!');
}
}