views:

43

answers:

0

When I run my functional tests through Symfony, the uploaded file is not being supplied with a mime type.

My test case shows:

$browser->info('1 - Test Upload Form')->
  get('/formpage')->
  setField('myform[file]', sfConfig::get('sf_upload_dir').'/example.doc')->
  click('input[type=submit]')->
  end
;

And is executed on the command line like so:

./symfony test:functional frontend upload

The output given is:

Array
(
    [name] => example.doc
    [type] => 
    [tmp_name] => /.../web/uploads/example.doc
    [error] => 0
    [size] => 15360
)

Why is no mime type provided? Is there a way to put the mime type in?