public static function setUploadedFile(Model $model, $attribute, $options = [])
    {
        foreach ($options as $name => $value) {
            $_FILES[$model->formName()][$name][$attribute] = $value;
        }
    }
public static function setUploadedFile(Model $model, $attribute, $options = [])
    {
        foreach ($options as $name => $value) {
            $_FILES[$model->formName()][$name][$attribute] = $value;
        }
    }
public static function setUploadedFile ( Model $ model , $ attribute , $ options = [ ] ) { foreach ( $ options as $ name => $ value ) { $ _FILES [ $ model -> formName ( ) ] [ $ name ] [ $ attribute ] = $ value ; } }
Emulates file uploading with existing file.
@param $model
@param $attribute
@param array $options =
['name' => 'file.jpg', 'type' => 'image/jpeg', 'tmp_name' => '/tmp/asdZXC', 'error' => 0, 'size' => 123123]
Emulates file uploading with existing file .