Level 5
If your form contains file input types, you may attach files to the form using the attach method:
public function testPhotoCanBeUploaded()
{
$this->visit('/upload')
->name('File Name', 'name')
->attach($absolutePathToFile, 'photo')
->press('Upload')
->see('Upload Successful!');
}
Refer this link : http://laravel.com/docs/5.1/testing