Hello, I’m trying to make a unit test to a model, that has a file validation rule (for example: array(‘pdfFile’, ‘file’, ‘types’=>‘pdf’)).
Is there a way to upload a file only from code, i mean without an file field, for getting the the model validate?
The assert that I’m trying to run is just this, but I must have the file upload.
$this->assertTrue($upload->validate());
Thanks